The deal will see Qatar export up to 3.75 million tonnes of liquefied natural gas a year, according to Pakistan's petroleum minister, Shahid Khaqan Abbasi.
This represents around 20 percent of the south Asian country's gas requirements.
The Qatar News Agency (QNA) confirmed the deal had been signed in a statement posted on its website.
Signup to our newsletter and follow us on Facebook and Twitter!
Supplies of the gas could start as early as March, according to the QNA.
Media reports in Pakistan estimated the deal was worth $16 billion (14 billion euros).
Abbasi told Pakistan media that the deal was a "game-changer" for his country, and the deal would help save the country one billion dollars annually.
Pakistan currently faces a severe shortage of natural gas, both for its electricity generation and industrial use.
The deal was signed on the first day of two-day visit to Qatar by Pakistani Prime Minister Nawaz Sharif.