Guests including Young Ones co-star Nigel Planer and other fellow performers such as Ruby Wax, Jennifer Saunders and Dawn French were among mourners who attended the service at St George's Church in picturesque Dittisham, Devon.
Around 140 mourners attended, mainly dressed sombrely in black, to celebrate the career of the star, who died last week aged 56 at his home in Barnes, south west London.
Mayall - known for roles in TV hits such as Bottom, The New Statesman and The Young Ones - also had a home in Devon.
Others who filed into the church, accompanied by Procol Harum's A Whiter Shade Of Pale on organ, were Alan Rickman and actor and director Peter Richardson, a long-standing friend with whom Mayall had worked repeatedly, particularly on the Comic Strip Presents films which helped to establish their careers.
Ben Elton, his old friend from university and one of his co-writers on The Young Ones, was also among the mourners who saw the wicker coffin - adorned with red flowers - carried into the church.
Prior to the service, Mayall's widow Barbara asked fans for their "thoughts and prayers" during the private ceremony.
A memorial service for the star is expected to be held in September.
He collapsed and died following what was described as an "acute cardiac event".
Mayall shot to national fame for his role as poetry-writing anarchist Rick in The Young Ones, going on to star as conniving Conservative MP Alan B'Stard in The New Statesman and Lord Flashheart in Blackadder.