The new president was elected by the electoral college of the newly elected members of the National Assembly and the four provincial assemblies, as per the provisions of the Constitution.
A businessman-turned-politician, Zardari is the husband of slain Pakistan prime minister Benazir Bhutto.
He received 255 votes while his opponent got 119, Pakistani media reported.
Zardari would replace the incumbent Dr Arif Alvi, whose five-year term ended last year. However, he has continued since the new electoral college was not yet formed.
Zardari, who served as the president from 2008 to 2013, will also be the first civilian to be elected for the second time as president. Achakzai is the head of his Pashtoonkhwa Milli Awami Party (PkMAP) and was contesting from the platform of the Sunni Ittehad Council (SIC), which came to prominence after independent candidates backed by jailed former prime minister Imran Khan’s Pakistan Tehreek-e-Insaf (PTI) joined it.