McIlroy has previously had a spell in charge of Northern Ireland
Morecambe manager Sammy McIlroy and his assistant Mark Lillis have left the club by mutual consent.
McIlroy took over at Christie Park in May 2006,
leading the Shrimps to promotion from the Conference in his first season in charge.
He leaves after Morecambe finished 20th in League Two this season, four points above the relegation zone.
"It is better for me and the club that I look for a new challenge,"
McIlroy told the Morecambe club website.
Morecambe's elevation from the Conference marked the first time in their history that they had been promoted to the Football League.
They finished fourth in League Two in 2010, one place off the automatic promotion slots, before losing in the play-off semi-finals to eventual winners Dagenham & Redbridge.
This season marked the Shrimps' first campaign in the new Globe Arena, but a record of only six league wins at home all season saw them sucked into the relegation battle.
"I have had a fantastic time at Morecambe," added former Northern Ireland, Macclesfield and Stockport boss McIlroy.
"I am delighted that I was able to lead the club into the Football League along with Mark Lillis and will always have great memories from my time there."
Lillis added: "To have been the coach of a club that won promotion to the Football League is something that I will always treasure and was definitely one of the biggest achievements of my career.
"I have had a great time at Morecambe and it has been a great journey for the club and the town.
"I hope the club goes on to achieve even more success in the future."
McIlroy and Lillis will be given the opportunity to say farewell to the Morecambe fans as guests of honour at the club's pre-season friendly against Manchester United.
"The board would like to record its sincere thanks for the hard work and commitment shown by both of them over the past five years," said chairman Peter McGuigan.
"Sammy and Mark steered the club into the Football League and led us to a play-of spot last season, which was a fantastic achievement.
"This season has been disappointing but everyone at the club will always recognise the fantastic contribution they both made to its success."
Watch highlights of McIlroy's final game in charge of Morecambe