The Anti-Corruption Foundation has been negotiating the exchange of Alexei Navalny for two years. He and several other people were to be swapped for FSB officer Vadim Krasikov, who is serving a life sentence in Germany. When the negotiations reached the final stage, Putin gave the order to kill Navalny as he did not want him to be free. This was revealed by the head of the ACF, Maria Pevchikh.
Navalny was a Russian citizen, he did not have passports of other countries and could not be swapped according to the usual rules. It was therefore decided to organize a humanitarian exchange — "Russian spies in exchange for political prisoners"
"At the beginning of February, Putin was offered to exchange a murderer, FSB officer Vadim Krasikov, who is serving a sentence for murder in Berlin, for two American citizens and Alexei Navalny. On the evening of February 15, I received confirmation that the negotiations were underway and in the final stages. On February 16, Alexei was killed," Pevchikh said.
The idea of this exchange was brought to Putin's attention by the oligarch Roman Abramovich. It was made clear to him that the only way to get Krasikov would be to swap him for Navalny. But Putin decided that if the Western countries were willing to swap Krasikov, they'd also swap him for someone else. Then he decided to kill Navalny because he was obsessed with hating his main opponent and didn't want to see him free.