Mr Buhari says his administration is working hard to address the soaring prices of foodstuff in the country.
The President's Senior Special Assistant on Media and Publicity, Garba Shehu, in a statement on Monday in Abuja, said Mr Buhari stated this in his Eid-el-Kabir message to Nigerians.
The News Agency of Nigeria (NAN) reports that the occasion of Eid-el-Kabir is being celebrated across the world.
In the message marking the auspicious Muslim occasion, the president restated the determination of his administration to create a just, harmonious and prosperous country in which the safety of life and property is assured.
While reflecting on current challenges facing the country, the president stated that "COVID-19 pandemic had taken a heavy toll on the economies of all countries, including Nigeria."
He added that floods had caused large-scale destruction to agricultural farmlands, thereby "impacting negatively on our efforts to boost local production in line with our policy to drastically reduce food importation.
"No government in our recent history has invested as heavily as we are doing to promote local production of about 20 other commodities, through the provision of loans and several other forms of support to our farmers."
The president noted that apart from the destruction caused to rice farms by floods, middlemen had also taken advantage of the local rice production to exploit fellow Nigerians.
According to him, this has further undermined the government's efforts of supporting local food production at affordable prices.
"As an elected president who enjoys the goodwill of the ordinary people that gave us their mandate, let me assure you that we are continuing with measures to bring relief to Nigerians, including making fertiliser available at affordable prices to our farmers," he added.
The president also noted that the current insecurity in the country "has produced severe and adverse effects on agriculture because farmers are prevented from accessing their farms by bandits and terrorists".
Mr Buhari reassured Nigerians that his administration had taken measures to address the nation's security challenges.
"We have started taking delivery of fighter aircraft and other necessary military equipment and hardware to improve the capacity of our security forces to confront terrorism and banditry," he said.
On the significance of the Eid-el-Fitr celebration, the president appealed to Muslims to demonstrate the good virtues of Islam through personal examples and practices.
He said: "Taking advantage of the celebration to exploit fellow citizens through outrageous prices of food and rams is inconsistent with fine virtues of Islam.
"As practising believers, we shouldn't seek obscene profits by making life difficult and miserable for others. We should not seek happiness at the expense of others.
"Remember that Islam is a religion of charity that urges us to love our neighbour as we love ourselves."
He urged all Muslims to continue to live in peace and harmony with their fellow Nigerians of other faiths in the spirit of peaceful coexistence.
"Let us pray for the progress of Nigeria at all times. Let us expose undesirable elements among us who are creating security problems for the country," the president further appealed to Nigerians.