Muhammadu Buhari has just returned from three months in the UK, amid widespread concerns over his health.
But government spokesman Garba Shehu said the office required renovation after damage was done to the furniture and air conditioning in his absence.
He told the BBC the president had a "well-equipped" office at home that he could work "perfectly" from.
Mr Buhari returned to Nigeria on Saturday, but did not reference his health in his first speech.
Some Nigerians had called for him to resign during his prolonged absence, saying he was unfit to run the country.
Others were angered by officials' refusal to disclose what Mr Buhari was being treated for.
He first travelled to London in June 2016 for what his office said was a persistent ear infection. He returned in January and May this year for an undisclosed illness.
Opposition politicians have claimed he was actually receiving treatment for prostate cancer - an accusation Mr Buhari denied.
"There's nothing at all to worry about as to the condition of his own health. From everything we have seen from the president - we have a new Buhari: energetic, well focused and it is clear he is enjoying excellent health," Mr Shehu told the BBC's Focus on Africa programme.
"He has recovered, so there is nothing to talk about in any speech."
Many users of Nigerian social media have cast doubt on the reason given for Mr Buhari working from home.
End of Twitter post  by @seunadebajo
End of Twitter post  by @realFFK
Some mocked the irony of the rat story because Mr Buhari is nicknamed the '"Lion President".
End of Twitter post  by @idrisayobello
End of Twitter post  by @AbdulMahmud01
But others have come to the defence of the president's spokesperson's story.
End of Twitter post  by @JackObinyan
One Twitter user @MandyChisholm wrote: "It is possible for rat to destroy Buhari's office, I kid you not, Nigerian rats are bloody.
"I remember the group of rats that ate my mattress, drank my bottle of olive oil, ate the whole bottle and everything else in site but not the rat poison. So imagine what political rats can do..."
Nigeria's president will spend three months working from home after his office was damaged by rats.