The loan comes amid heightened military and political tension between Ukraine and neighbouring Russia.
The loan is dependent on strict economic reforms, including raising taxes and energy prices.
The money will be released over two years, with the first instalment of $3.2bn available immediately.
The head of the IMF, Christine Lagarde, said the IMF would check regularly to ensure the Ukrainian government followed through on its commitments.
In March Ukraine put up gas prices by 50% in an effort to secure the bailout.
The government has also agreed to freeze the minimum wage.
The bailout had to be approved by the IMF’s 24-member board, which includes a Russian representative.
The IMF loan will also unlock further funds worth $15bn from other donors, including the World Bank, EU, Canada and Japan.
In December last year, Ukraine agreed a $15bn bailout from Russia, but this was cancelled after protests forced out pro-Russian President Viktor Yanukovych.
On Wednesday, the IMF warned that Russia was “experiencing recession” because of damage caused by the Ukraine crisis.
The fund said $100bn (£59bn) would leave Russia this year, partly caused by US and EU and sanctions.
The sanctions were imposed after Russia annexed the Crimea region from Ukraine last month.
Pro-Russian activists have taken over scores of government buildings in cities and towns across eastern Ukraine, though the Kremlin denies its forces are involved.
The activists have also taken hostages including international monitors.
Tens of thousands of Russian troops are stationed close to the Ukrainian border, and Moscow has warned that its soldiers will act if Russian interests in eastern Ukraine – where a majority of the population are Russian-speaking – are threatened.
The US and EU have accused Russia of failing to implement the terms of a deal agreed in Geneva aimed at defusing the crisis by disarming illegal militias.
They have both stepped up sanctions against Russia this week, naming more individuals and companies facing travel bans and asset freezes.
Moscow blames Kiev for the unrest and has condemned the sanctions
The IMF bailout will also make available $1bn in loan guarantees from the US, which was recently approved by Congress.
“Today’s final approval for the $17bn IMF programme marks a crucial milestone for Ukraine,” said US Treasury Secretary Jacob Lew in a statement.
He added that the bailout will “enable Ukraine to build on the progress already achieved to overcome deep-seated economic challenges and help the country return to a path of economic stability and growth”.
Earlier on Wednesday, an international conference in London ended with a commitment to help Ukraine recover tens of billions of dollars worth of assets which were allegedly stolen by the ousted President Yanukovych and his allies.