Some people thought he had been "cloned", but "it's [the] real me, I assure you," Mr Buhari said.
Rumours that he had been replaced with a body double called "Jubril" from Sudan had been widely shared online.
The 76-year-old Mr Buhari, who is seeking re-election in February next year, has been beset by ill health since taking office in 2015.
He was on "medical leave" in the UK for three months in 2017.
He revealed after his return to Nigeria that "I have never been so sick", but did not disclose what he was suffering from. He insists he is now in good health.
According to an AFP Fact Check investigation the rumours began late last year and have appeared on Facebook, Twitter and YouTube. Posts promoting the rumours have been viewed more than 500,000 times.
A former aide to Mr Buhari's predecessor, Goodluck Jonathan, is among the high profile individuals who have promoted the rumours.
Nnamdi Kanu, the leader of secessionist group Indigenous People of Biafra (Ipob), has also been fuelling the rumours, AFP found.
In one instance, Mr Kanu shared two images of Mr Buhari, one reversed, to allege that the Nigerian leader, who is right-handed, was using his left hand - "proving" that that meant he was a body double.
One of Nigeria's main newspapers, Guardian, published a story in November about the rumours which the paper said "has refused to go away".
A scene from the 1997 film "Face/Off" has also been used by those promoting the rumours to show how a dead Buhari's face could have been transplanted to a body double.
Mr Buhari, who is in Poland attending a UN climate change conference, was asked about the rumours during a meeting on Sunday with Nigerians in the country.
Mr Buhari said those spreading the rumours about his health and identity were ''ignorant and irreligious.''
''A lot of people hoped that I died during my ill health. Some even reached out to the vice-president to consider them to be his deputy because they assumed I was dead.
"That embarrassed him a lot and of course, he visited me when I was in London convalescing… It's [the] real me; I assure you,'' Mr Buhari added.
A former vice-president, Atiku Abubakar, 72, has emerged as Mr Buhari's main challenger in next year's election.
The opposition is expected to make the president's health a major campaign issue, but he insists he is healthy and fit to serve a second term.