Mr Gorbachev's letter, on the website run by his charitable foundation, said "many people in Russia regard this scandalous case as trumped-up, launched on the initiative of Microsoft corporation to set a precedent".
'Show mercy'
"We have great respect for the work of Microsoft's programmers... and are in no way casting doubt on the principle of punishment for intellectual property violations.
"However, in this case we ask you to show mercy and withdraw your complaint against Alexander Ponosov," the letter read.
Mr Gorbachev said that under Russian criminal law the teacher could face "imprisonment in Siberian camps".
The Perm region lies in the Ural Mountains, between Moscow and Siberia.
Microsoft accuses the teacher of knowingly using pirated Windows software in the school and causing the company losses put at 266,000 roubles ($10,000; £5,000).
Mr Ponosov says he is innocent, that the software had been pre-installed and he did not know it was unlicensed when he obtained the computers.
At his news conference on 1 February, President Putin said investigators should "go after the distributors, not the users".
"It's ridiculous to just arrest a chap for using computers," he said.