In 2012, she gained 15.7 million votes, beating her liberal rival, who was backed by 14.7 million people.
Moon won most votes in the capital, Seoul, and in the traditionally liberal Jeolla region, in the south-west, but Park won the rest of the country and got huge support in the conservative Gyeongsang region, in the south-east.
In May, Moon was finally elected president.
The NIS, which was founded as the Korean Central Intelligence Agency (KCIA) and has close links with the CIA in the United States, has a history of supporting right-wing candidates in Korea.
In the fall of 2012 Park's predecessor, the NIS, under the conservative President Lee Myung-bak, apparently threw its support behind efforts to get Park elected.
Park is the daughter of Park Chung-hee, a military dictator who became President in the 1960s and helped kick off South Korea's phenomenal economic success.
He was assassinated by the then head of the KCIA in 1979, but remains the most popular president in the history of South Korea.
His daughter is currently on trial for corruption and abuse of power stemming from her close relationship with Choi Soon-sil, the daughter of Choi Tae-min, a pseudo-Christian leader who set up a cult called The Church of Eternal Life and claimed he had been visited by the soul of Park's mother, who was murdered by a North Korean agent in 1974.
Several Korean conglomerates, or chaebol, allegedly donated money to the Church of Eternal Life or other causes supported by Choi Soon-sil as a favor to President Park.
Park finally resigned and left the Blue House in March, after months of protests.
The NIS has been under investigation by the Korean police and its former chief, Won Sei-hoon, is on trial on multiple charges of election fraud.
The NIS, in a bid to head off Moon's reforms, launched its own in-house investigation and released a report on the last day of Won's trial.
The report says it has discovered dozens of agents in its cyberwarfare unit had posted bogus messages of support for Park and criticism of Moon on social media and news websites during the 2012 campaign.
"The teams were charged with spreading pro-government opinions and suppressing anti-government views, branding them as attempts by pro-North Korean forces to disrupt state affairs," said an NIS internal report.
Park's Liberty Korea party has claimed the NIS inquiry is politically motivated.
"The NIS says it will dissociate itself from politics but it is meddling in politics again by starting this probe," said Liberty Korea spokesman Kang Hyo-sang.
Won, who could go to prison for up to four years if found guilty, allegedly urged senior NIS officials to intervene in the election, telling the battle was on a par with the cyber war with North Korea.
"Our psychological warfare against North Korea is important, but our psychological warfare against the South Korean public is pretty important, too," Won allegedly said during a meeting in April 2012.
Moon has pledged to reform the NIS to prevent it influencing future elections.
But the agency has been reformed twice already.
In 1979 the KCIA was renamed the Agency For National Security Planning and lost much of its power, following the assassination of Park Chung-hee.
Then, in 1999 it was reformed again in an effort to remove ultra-conservative elements and was renamed the NIS by President Kim Dae-jung.