An important thing to mention for Napoleon's invasion of Russia, it wasn't made to replace the Russian government. The Napoleonic Code itself was only placed in areas under direct French administration or by those that were directly interested as such. The Napoleonic Code was not put into effect with the Prussian and Austrian lands.
As such, Napoleon was invading Russia for one reason, breaking promises. The French and Russians were fighting up until the Treaty of Tilst where Alexander and Napoleon had agreed to end fighting, ending alliances with enemies of France, and implementing the Continental System in Russia. By 1812, Russia was undoing all of it.
Was it acceptable to do that? Of course, Russia has its own interests and people to care of, but Alexander, not the most certain and determined of rulers was slowly being turned by his own court to return to the arms of British gold. As a result, Russian ports opened up to Britain and would actively work to undermine the Continental System. Worse, Russia was starting to raise troops in order to ensure that Poland would never become a Kingdom (another promise which Napoleon was willing to keep but Russia wasn't sure he would).
With news that Russia had rejected his economic policies and preparing an army, Napoleon had to act. He gathered the largest army to have been created ever in world history (with certain reliability in the numbers). For the sake of his political and economic policies, Napoleon needed to enforce them in order to ensure the credibility of France, so he preemptively invaded Russia to do exactly that.
The serfs were never a real target, Napoleon had certainly brought the Revolution to many parts of Europe, but never to the extreme degree of the original intentions of the French Directory and Jacobin governments.
Napoleon's end game in Russia is something of a riddle. Aside from the objective of bringing Russia to heel and back into the Continental System, there really was not much of a coherent strategy behind Napoleon's actions. He had hoped to destroy the Russian armies at the Polish frontier, but the Russian forces evaded the Grande Armee. Thus Napoleon was at a loss in this campaign and often let events play out as he became preoccupied with destroying the Russian army.
Within this context, rearranging Russia's Western territory was certainly a possible outcome for a French victory. While a wholesale occupation of the Russian empire was impossible, a restored Kingdom of Poland or a French-created Duchy of Lithuania was in keeping with Napoleonic precedents.
The chief precedent for this with Napoleon's creation of the Duchy of Warsaw in 1807. The Duchy's constitution abolished serfdom, cemented the use of the Polish language in education, and created a Polish national army that revivified the idea of a Polish nation for Polish national activists. The Duchy possessed a rationalized bureaucracy and it soon became the home for an emerging Polish middle strata. However, French-led reforms had limits. Despite the establishment of legal equality, the new political order in the Duchy favored the land-owning magnates and the Polish nobility. As would happen in Russia some sixty years later, the abolition of serfdom imposed from the top-down also eliminated many of the ancien regime legal protections for the peasantry as an estate. The result was the creation of a kind of neo-serfdom in the Polish countryside as the peasantry became bound to the land by virtue of the market. The sovereignty of the Duchy was more apparent than real and the French ambassador exercised more authority in the Duchy than its absentee Duke, the Wettin King of Saxony.
It is plausible that Napoleon intended to resurrect the kingdom of Poland if his invasion succeeded. His memoirs on St. Helena indicated that Napoleon would have put Józef Poniatowski on the throne, but this assertion should be taken with a grain of salt. The French 1812 treaties with both Prussia and Austria treated the Polish issue very gingerly and there is evidence that Napoleon's ardor for an independent Polish state had cooled somewhat by 1812. Napoleon only made very small steps to resurrect the Polish-Lithuanian commonwealth or grant Lithuania autonomy from the Russian empire. He did set up a provisional Lithuanian government and raised several Lithuanian military units. These efforts are counter-balanced by the presence of French military governors and the refusal of the French to announce an abolition of serfdom, which would have been a sign of a more permanent French reform of Lithuania. Military expediency underlay much of Napoleon's actions in Lithuania as the provisional government and the Lithuanian elite provided the French armies supplies and other forms of tribute.
But this is all just hypothetical projections based on prior historical precedents. Although Napoleon would often retroactively portray his policies and grand strategy as following a coherent plan, there was a marked tendency for Napoleon to improvise solutions to the problems before him.
Sources
Dwyer, Philip. Citizen Emperor: Napoleon in Power. Yale University Press, 2013.
Elena, I. Fedosova. "Polish Projects of Napoleon Bonaparte." The Journal of the International Napoleonic Society 1, no. 2: 98.
Gaidis, Henry. "Napoleon's Lithuanian Forces." Lituanus: Lithuanian Quarterly Journal of Arts and Sciences 30, no. 1 http://www.lituanus.org/1984_1/84_1_01.htm
Nester, William. "Why Did Napoleon Do It? Hubris, Security Dilemmas, Brinksmanship, and the 1812 Russian Campaign." Diplomacy & Statecraft 24, no. 3 (2013): 353-364.
Schneid, Frederick C. "Kings, clients and satellites in the Napoleonic imperium." The Journal of Strategic Studies 31, no. 4 (2008): 571-604.
Zawadzki, Hubert. "Between Napoleon and Tsar Alexander: The Polish Question at Tilsit, 1807." Central Europe 7, no. 2 (2009): 110-124.
Napoleon had thought to abolish serfdom, he ordered something to be found in the Moscow archives of the peasant question. But most likely, it was just speculation. If so, even with Poland, Napoleon has not been fully defined, so as not to anger the king, it is even more so in Russia, of course, no constitution in the French style could not be.
As for the peasantry, some of Napoleon's generals retained their republican views, tried to persuade him to their side, agitated. Peasants say that, well, gentlemen, do not come back, you are now free men. Under the influence of other speeches peasants were not averse to plunder the abandoned manor landlords. But once more the question arose of what the French authorities is necessary to recognize and properly fed French troops. It was then that "the masses" had their own point of view and did not intend to keep the invaders.
In addition, the French behaved very arrogantly and brutally. They robbed and raped, and killed those who tried to resist. This instantly aroused protest even those peasants who initially believed in the stories of freedom.