The BBC said the series about the young King Arthur and his put-upon wizard servant will come to a "natural and dramatic end" with a two-part finale.
The show, which features veteran stars such as Richard Wilson and John Hurt, pulls in almost seven million viewers.
In 2009 the BBC called time on another historical fantasy which had become a staple on Saturday evenings when it ended its retelling of Robin Hood.
Actor Colin Morgan, who has played Merlin since the show's debut in 2008, said: "I think the show has run its natural course. It's grown each year and now we've arrived at its strongest point and we've achieved what we set out to do."
Johnny Capps, who co-created the show with Julian Murphy, said: "This is the series where the storylines truly reach their apex. We always felt the story of the legend was best told across five series, leading to a spectacular finale that draws on the best-known elements of this much-loved story and brings to a conclusion the battle for Camelot."
Over the years Hurt has voiced the Great Dragon, and the programme has included an array of guest stars which has included Michelle Ryan, Emilia Fox, Mackenzie Crook, Adrian Lester, Warwick Davis and Miriam Margoyles.