In court, Humaira Khokar was accused of adultery by a male cousin, Muazzam Ghias.
Muazzam Ghias alleged that she had already married him a month before the betrothal to Mahmud Butt, and his lawyer produced a video recording of the alleged earlier marriage.
Adultery in Pakistan is punishable by stoning to death under Islamic law.
But the High Court said the marriage to the cousin had been faked and thus null and void.
In what the defendant's lawyer described as "a landmark case", the court ruled that Ms Khokar's marriage to Mr Butt was legally valid, and the couple should be allowed to live together at a place of their choice.
Arresting officer jailed
Justice Tasadduq Hussain Jilani also sentenced Police Inspector Subah Sadiq, who arrested the couple, to a month's imprisonment with a token fine of 5,000 rupees (about $60).
Mahmud Butt, who has a son from a previous marriage, is settled in the US with his parents.
Ms Khokar, the 29 year old daughter of a Muslim League member of the Punjab Assembly, has attracted public attention to the cause of choice in marriage.
Reporting from Lahore, the BBC's Shahid Malik said the case focused public attention on marital choice and evoked sympathy from human rights bodies.
A women's rights worker filed a writ petition against the couple's illegal confinement.
Ms Khokar has lived apart from her husband for almost a month at a women's shelter in Lahore, protected by giant steel gates and seven men carrying automatic rifles.