Ansari worked as an ambassador and served as the Vice-Chancellor of the Aligarh Muslim University from 2000 to 2002. Later he was Chairman of the National Commission for Minorities from 2006 to 2007. He was elected as the Vice-President of India on 10 August 2007 and took office on 11 August 2007. He was reelected on 7 August 2012 and was sworn-in by Pranab Mukherjee, the President of India. The oath taking ceremony was conducted at Rashtrapati Bhavan on 11 August 2012. His second term ended in August 2017 since he decided not to run for a third term in the 2017 vice-presidential election. Upon the inauguration of Ram Nath Kovind as President of India in 2017, Ansari became the first Indian Vice-President to serve during the terms of three presidents.
Hamid Ansari was born to Mohammad Abdul Aziz Ansari and Aasiya Begum, in Kolkata (now Calcutta), West Bengal, India on 1 April 1937 though his family belongs to Ghazipur in Uttar Pradesh. Ansari is the grandson of a brother of former Congress President Mukhtar Ahmad Ansari, a leader of the Indian independence movement.
Ansari studied at St. Edward's School, Shimla, St. Xavier's College, Kolkata and Aligarh Muslim University.
He started his career as Officer in the Indian Foreign Service in 1961. He was Permanent Representative of India to the United Nations, Indian High Commissioner to Australia and Ambassador to the United Arab Emirates, Afghanistan, Iran and Saudi Arabia. He was awarded the Padma Shree in 1984. He was also Professor & Vice-Chancellor of the Aligarh Muslim University from May 2000 to March 2002. He is known for his role in ensuring compensation to the victims of the Gujarat riots and pushing for a complete re-look into the relief and rehabilitation for riot victims since 1984.
Ansari became the chairman of India's National Commission for Minorities (NCM) on 6 March 2006. In June 2007, Ansari, in his capacity as NCM chairman, upheld the decision of St. Stephens College to earmark a small percentage of seats for Dalit Christians. He resigned as NCM chairman soon after his nomination for the post of India's Vice-President.
On 20 July 2007, Ansari was named by the UPA-Left, the ruling coalition in India, as its candidate for the post of Vice-President for the upcoming election. When asked, Ansari said he felt "humbled" over the UPA-Left decision naming him as their candidate. "I am humbled by the confidence reposed in me". Ansari refused to say more when asked about his prospects in the August 2007 Vice-Presidential election. Ansari secured 455 votes, and won the election by a margin of 233 votes against his nearest rival Najma Heptullah.
In 2012 VP election, the Congress-led UPA re-appointed Ansari as their candidate for the post of VP. The NDA nominated Jaswant Singh, former Finance, External Affairs and Defence minister as well as former Leader of Opposition. The NDA cited Ansari's conduct in the Rajya Sabha during The Lokpal Bill, 2011 debate when he had abruptly adjourned the House sine die. Hamid Ansari was re-elected for the second term on 7 August 2012, defeating the NDA's nominee Jaswant Singh by a margin of 252 votes.
According to the Constitution of India, Ansari, as Vice-President of the Republic, also serves ex officio as Chairman of the Rajya Sabha.
Ansari is a West Asia scholar and has written on the Palestinian issue and taken positions inconvenient to the Indian official line on Iraq and Iran. He questioned India’s vote in the International Atomic Energy Agency on Iran’s nuclear programme where India voted against Iran. He said that though the Indian Government claimed to have acted on "its own judgement," this was not borne out by facts.
He was the chairman of a working group on "Confidence building measures across segments of society in the State," established by the Second round Table Conference of the Prime Minister on Jammu and Kashmir in 2006. The report of the working group was adopted by the Third round Table in April 2007. Among other things, the report advocates recognizing the right of Kashmiri Pandits to return to "places of their original residence". This right, it argued, should be recognized without any ambiguity and made a part of state policy.
Ansari feels that there is a sense of unease among Indian Muslims. He said this on the last day of his tenure as the Vice President of India, one of the highest constitutional posts in the country. Ansari's comment was met with a gibe by India’s prime minister Narendra Modi.
Ansari quoted, "The language used by the Pope sounds like that of his 12th-Century counterpart who ordered the crusades... It surprises me because the Vatican has a very comprehensive relationship with the Muslim world." – 15 September 2006, as Chairman of the Minorities Commission of India, on the Pope Benedict XVI Islam controversy.
"No citizen is apolitical; as a citizen, by definition, has to take interest in public affairs.” – 10 August 2007, after being elected Vice-President, on being asked whether he is apolitical.
"There is no shame in acknowledging the faults and the lacunae that exist in the policies and institutions pertaining to Human Rights." -26 September 2013, addressing the First Convocation of Central University of Bihar.