The Beverly Hills Cop star was presented with America's top comedy prize at the Kennedy Center in Washington, D.C. following a string of tributes from comedians including Chris Rock, Dave Chappelle, Arsenio Hall and fellow Saturday Night Live alum Tracy Morgan.

Murphy, who had a successful stand-up career in the 1980s, ended his 28-year absence from live comedy during his acceptance speech by cracking a string of jokes, most of which were at the expense of Cosby, a fellow Mark Twain Prize recipient.

Cosby has been accused of sexual assault by more than 50 women in the past year, and has been stripped of many honours he was previously awarded in the wake of the allegations. A deposition from a 2005 lawsuit also revealed he had bought sedative pills to give to women he wanted to sleep with.

Referring to the Cosby scandal, Murphy joked that you know you've been bad "when they want you to give your trophy back," according to Associated Press.

He then asked prize bosses, "Bill has one of these. Did you all make him give it back?" before performing an impersonation of Cosby refusing to give back his award.

During his impression, he said as Cosby, "I would like to talk to some of the people who feel like I should give back my motherf**kin' trophies... You may have heard recently that I allegedly put the pill in the people's stomach ... If I ever see or meet this Hannibal Buress in person I am going to try and kill this man!"

Buress reignited the allegations into Cosby's behaviour when he made a comedy sketch about them last year (14).

The Mark Twain Prize for American Humor is awarded annually to those "who have had an impact on American society in ways similar to the distinguished 19th century novelist and essayist".

Previous honourees include Whoopi Goldberg, Will Ferrell, Steve Martin and Billy Crystal. Cosby was awarded the prize in 2009.

Murphy's tribute will be televised on 23 November (15).