It also said it would not exercise an option to take a stake in the Trans Anatolian Gas Pipeline (TANAP) across Turkey, which is part of plans to bring gas from the region to Europe.
Buyers of the Shah Deniz stake were state-backed Azerbaijan oil group Socar (6.7 percent) and Britain's BP (3.3 percent.)
"We have considered our potential positions throughout the project's value chain, balancing economics and risks to identify the optimal participation," Statoil chief executive Helge Lund said in a statement.
John Olaisen, an analyst at Norwegian investment bank ABG Sundal Collier, told business daily Dagens Naeringsliv that Statoil sold the assets for "a very good price," corresponding to three times their book value.
The announcements came as the Shah Deniz consortium, led by BP, unveiled $28 billion worth of infrastructure investments to bring Azeri gas to Europe.
In addition to TANAP, the Shah Deniz II project will include further investments in the gas field, expanding the South Caucasus Pipeline through Azerbaijan and Georgia, and building a pipeline across Greece and Albania into Italy.
The move is seen as a key step toward European ambitions of reducing its energy dependence on Russia.