The Conservative lawmaker, a former mayor of London seen as a possible successor to Prime Minister David Cameron, won for a limerick about a "young fellow from Ankara" who "sowed his wild oats / With the help of a goat / But he didn't even stop to thankera."
The Spectator magazine set up the informal 1,000 pounds (USD 1,465, 1,306-euro) "President Erdogan Insulting Poetry Competition" last month.
He said it was a "scandal" that German comedian Jan Boehmermann, who is facing possible criminal proceedings in Germany for a 24-line poem that accused Erdogan of bestiality and paedophilia.
Under a rarely enforced German law, insulting organs or representatives of foreign states can be punishable by up to three years in prison.
Also Read
Erdogan has come in for fierce Western criticism of late over his increasingly authoritarian rule.
Handing the prize to Johnson will provoke criticisms of an inside job as Johnson is a former Spectator editor.
The magazine writer and author who came up with the prize admitted his decision was all about making a statement.
"I think it a wonderful thing that a British political leader has shown that Britain will not bow before the putative Caliph in Ankara," Douglas Murray wrote.
Britain votes on June 23 in a referendum on whether to stay in or leave the European Union.