President Jacob Zuma said it was irresponsible of citizens to "badmouth" the country amid trying economic times.
Zuma told the National Council of Provinces (NCOP) on Thursday that unity among "key stakeholders during this difficult time" was the only way to ease the country's economic woes.
"We have a responsibility to promote our country externally, and to solve whatever problems we have internally in a patriotic and responsible manner," Zuma told MPs in the NCOP.
Attacking South Africa and badmouthing the country when she is most vulnerable is irresponsible, especially if done by South Africans themselves.
"You're the main culprit," came a voice from the floor.
Zuma was speaking on the occasion of the president's annual address in the House under the theme "deepening unity for inclusive growth". He was repeatedly heckled by opposition MPs at different points in his speech.
He also addressed the anxiety around the delays in findings a new social grants service provider.
The inter-ministerial committee on comprehensive social security was working to find workable solutions before the Constitutional Court's March 2018 deadline.
'Privileged class wants to forget apartheid'
Zuma reminded MPs of the "damaging legacy of apartheid".
"We know that many among the privileged classes become angry when we speak about the reality of the apartheid legacy as they want it to be forgotten.
"We will continue to work hard to reverse the horrible impact of this legacy. It is incorrect that the income level of a white household remains six times higher than that of a black household."
He called on citizens to work together to end inequality, as this was necessary to achieve true reconciliation.
"The liberation struggle was not about political freedom only. It was about ensuring the expansion of economic opportunities to include the majority."
Zuma also addressed the recent "Black Monday" marches in protest against farm murders in the country.
'Displaying old flag grossly insensitive'
Referring to the circulation of images on social media of the alleged displays of the old apartheid flag at some of the marches, Zuma said he wanted to remind the country that reconciliation required responsibility.
Many of the images have since been proven to be old and unrelated to the marches.
It is of serious concern that some of the people who marched reportedly against farm murders last Monday, displayed symbols of racism and of the past such as the old apartheid flag.
"This means that some compatriots yearn for the past in which black people were subjugated and treated as pariahs in the land of their birth. This conduct is disgusting, shocking and grossly insensitive.
"It indicates how far we still need to go in building a new society."
He said more stringent measures were needed to tackle racism in the country.
"The Department of Justice is finalising the legislation to outlaw hate speech and racism as there should be consequences for such unpatriotic and divisive conduct which seeks to take us backwards."
Fees report 'coming soon'
Zuma also wished matric pupils well in their examinations, which are currently underway.
He acknowledged that pupils who passed matric faced challenges with funding for further education.
"I am aware of the anxiety regarding the funding for higher education.
"The inter-ministerial committee responsible for higher education funding, chaired by the minister in the presidency, working with the presidential fiscal committee, are assisting me in processing the report of the Heher Commission. I will be making an announcement soon on the report."
Zuma appealed to the nation to celebrate the ideals of former president Nelson Mandela, who would have turned 100 next year.
"We should use the celebration to promote unity, nation building, and non-racialism -
"And non-stealing," heckled one last MP.
"Let us not be diverted from this noble mission. We have it within our power to make South Africa a better place for all our people, especially the poor and the working class," Zuma finished.