This article is more than
7 year oldJoachim Iroko, a market trader also known as Joe Fortemose Chinakwe, was arrested in 2016 accused of conduct likely to cause a breach of the peace.
A judge in south-west Ogun state found the prosecution had failed to substantiate the charges against him.
The arrest sparked nationwide outrage. Critics accused the police of stifling constitutionally guaranteed freedoms.
At the time, presidential spokesman Garba Shehu said that Mr Buhari must be having a good laugh about the story and that anyone linking him to the dog incident was displaying their ignorance.
Speaking to Nigeria's daily Vanguard newspaper after the ruling, Mr Iroko said he had been vindicated and thanked all those who had spoken out on his behalf.
Mr Iroko's lawyer said the prosecution had repeatedly failed to present witnesses and that the complainant was also absent.
The man who lodged the complaint in August 2016 was reported to be a neighbour.
Mr Iroko walked his pet - with the name Buhari painted on both flanks - in an area where support for the president was high, police said at the time.
Officers said they were worried the move could antagonise people, though he insisted it was meant as a compliment and that people had misunderstood him. Mr Iroko said he named his dogs after his role models, and that others had been called Nelson Mandela and Obama.
"I named my beloved pet dog Buhari, who is my hero....My admiration for Buhari started far back when he was a military head of state."
He later told local media he had received death threats over the perceived slight.
<p>A US judge has ruled against Donald Trump getting his hush money conviction thrown out on immunity grounds.</p>