The Russian-language feed, which has more than 2.5 million followers, was also filled with tweets denouncing President Vladimir Putin.
The impersonator wrote that Dmitry Medvedev would be pursuing a new career as a freelance photographer.
A Russian hacking collective has claimed responsibility for the attack.
The government quickly confirmed the account had been hacked.
“I resign. I am ashamed of the government’s actions. I’m sorry,” the infiltrators initially wrote, following it up with tweets saying that electricity would be banned, and that Vladimir Putin was “wrong”.
Shaltay-Boltay, a Russian hacking collective, has said it carried out the attack.
The group, whose name is Russian for Humpty Dumpty, also claimed it had infiltrated the Gmail account and iPhones of Dmitry Medvedev.
Shaltay-Boltay tweeted: “Several mail accounts – including the Gmail – and the content of three iPhones of a certain prime minister have randomly fallen into our hands on the internet. Details later.”
Dmitry Medvedev’s English-language Twitter account did not appear to be affected by the attack.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…