Sharif approved an inquiry committee's recommendation to remove Fatemi from his post. The inquiry committee was set up last year to probe the controversy surrounding a controversial report by daily Dawn about a key meeting on national security.
In October, a columnist for Dawn newspaper wrote a front-page story about a rift between civilian and military leaderships over militant groups that operate from Pakistan but engage in proxy war against India and Afghanistan.
The committee, headed by Justice (retd) Aamir Raza Khan, included representatives of the Intelligence Bureau, the Military Intelligence and the Inter-Services Investigation.
The report had said that political leadership had accused army in the high-level meeting to stop creating hurdles in the way of crackdown on some militant entities.
The government denied its role but the army took a strong acceptance to the story and relations between army and the civil government deteriorated.
The PML-N government was forced to remove then information minister Pervaiz Rasheed but a probe was also initiated at the demand of army to fix the responsibility. The report was submitted to the prime minister this week.
According to the inquiry report, Fatemi was primarily responsible for leaking the report of the key meeting, and Sharif took action against him.
"Allocation of portfolio of Foreign Affairs to Syed Tariq Fatemi, Special Assistant to the Prime Minister, shall be withdrawn," according to a letter issued by government.
Fatemi is considered as trusted aide of the prime minister and his removal is a setback for the government of Sharif who is already under pressure due to Panama case verdict.
Sharif also directed that the role of Dawn editor Zafar Abbas and reporter Cyril Almeida shall be referred to All Pakistan Newspapers Society (APNS) for necessary disciplinary action to be taken against them, according to letter.
It said that the APNS, a representative body of print media, shall also be asked to develop a Code of Conduct for the print media especially when dealing with issues relating to security of Pakistan and to ensure that stories on issues of national importance and security are published by abiding to basic journalistic and editorial norms.
Sharif also ordered action against Rao Tehsin Ali, Principal Information Officer of the Ministry of Information, under disciplinary rules for the charges based on findings in report.
The story in Dawn said "in a blunt, orchestrated and unprecedented warning, the civilian government has informed the military leadership of a growing international isolation of Pakistan and sought consensus on several key actions by the state."
It further said that "military-led intelligence agencies are not to interfere if law enforcement acts against militant groups that are banned or until now considered off-limits for civilian action.