The coded letter, signed 'Nap', sees the French leader use unusually emotive language to complain of harsh conditions and the shortcomings of his grand army. Photograph: Christophe Ena/AP

The single line of Napoleon's secret code told Paris of his desperate last order against the Russians: "At three o'clock in the morning, on the 22nd I am going to blow up the Kremlin."

By the time Paris received the letter three days later, the Russian tsar's seat of power was ablaze and the diminished French army was in retreat. Its elegantly calligraphic ciphers show Napoleon at one of his weakest military moments.

"My cavalry is in tatters, many horses are dying," dictated Napoleon, showing the strain of his calamitous Russian invasion, which halved his army.

The rare document – dated 20 October 1812, signed "Nap" and written in numeric code – is up for auction on Sunday in Fontainebleau.

The code, used for top-secret letters when Napoleon was far from home, was regularly changed to prevent French military orders getting into enemy hands.

Napoleon must have dispatched his strongest horses and riders to carry the news: it only took three days to reach France's interior ministry – more than 1,500 miles (2,400km) across Europe.

"This letter is unique. Not only is it all in code, but it's the first time we see this different Napoleon. He went into Moscow in 1812 at the height of his power. He returned profoundly weakened. In Moscow, the Russians had fled days before and burned down the city. There was no victory for Napoleon, nor were there any provisions for his starving, dying army," says Jean-Christophe Chataignier of the auction house in Fontainebleau.

The only thing left for the weakened leader was to give the order to burn Russia's government buildings – coded in the letter as "449, 514, 451, 1365 ..."

It is evidence of what historians call the beginning of the end of Napoleon's glorious empire, which started in Russia and ended at Waterloo three years later.

In June 1812, Napoleon's "grand army" – which consisted of 600,000 men – confidently entered Russia. But they were woefully unprepared for the harsh weather, the strong Russian defence and scorched-earth tactics, which left nothing behind to sustain the hungry and freezing French troops.

"This letter is an incredible insight. We never see Napoleon emotively speaking in this way before," says Chataignier. "Only in letters to [his wife] Josephine did he ever express anything near to emotion. Moscow knocked him."

In the text – which announces that his commanders are evacuating Moscow – Napoleon laments his army's plight, asking for assistance to replenish his forces and the ravaged cavalry, which saw thousands of its horses die.

In September of this year the Kremlin held huge celebrations to mark the bicentenary of Napoleon's defeat. The highlight was a re-enactment of the battle of Borodino – one of the most damaging clashes for the French troops – before several hundred thousand spectators.

The coded letter, which is accompanied by a second decoded sheet, is estimated to fetch up to €15,000 (£12,150).

Sign up for the Guardian Today

Our editors' picks for the day's top news and commentary delivered to your inbox each morning.