The 30-year-old County Down man became the first Irish cyclist to win a world track title in 117 years with victory in the scratch race in Belarus in 2013.
Irvine also won a World Cup gold in Manchester in the same year.
"Missing out on the Olympics is a big part of it and I fell out of love with cycling," said the Northern Irishman.
He added: "The passion to train and put all that time into it has gone. I would just be wasting my time if I carried on."
Media playback is not supported on this device
Irvine secured silver in the individual pursuit in Belarus an hour before his triumph in the scratch event at the 2013 World Championship.
It was a rollercoaster year for Irvine, who also won silver in the points race at the World Championships and a European bronze medal in addition to sustaining a couple of injuries.
A month after his Belarus triumph, Irvine suffered a leg fracture during the Tour of Taiwan road racing event later in 2013 sustained leg muscle injuries at a track event in Belgium.
However, Irvine finished 2013 as number one scratch rider in the 2013 UCI world rankings and claimed a scratch silver medal in the 2014 Track Cycling World Championships.
His achievements in 2013 led to him being named as the BBC Northern Ireland Sports Personality of the Year.
Media playback is not supported on this device
After winning silver in the scratch race at the 2014 World Championships in Colombia, Irvine was regarded as a strong medal contender at the Commonwealth Games in Glasgow and improving on the team pursuit bronze that he won with Northern Ireland in Delhi in 2008.
However, Irvine produced disappointing performances in Glasgow and has struggled to regain form since then, with a number of injuries not helping.
Irvine said the "aches and pains" were another factor in his decision to retire.
"I just loved the fact that I got cycling to be more mainstream than it used to be," he added.
"I'm glad I achieved some world and European success - I got some medals and got my name in the history books."

A coastguard helicopter from St Athan, in Vale of Glamorgan, flew to the scene on Saturday evening as the one based in north Wales was on another mission.
The pair were helped to the top of the ridge by Llanberis Mountain Rescue Team (MRT) volunteers using ropes, and then winched aboard the helicopter.
They were dropped off at Nant Peris while the MRT walked down the peak.

Most of the injuries were minor, but several people had been taken to hospital, one official said.
The trains had come from Bakersfield and Los Angeles. They collided near Oakland Station at around 2200 local on Wednesday (0500 GMT Thursday).
A fire official told Associated Press one train had been stationary and the other was travelling at 15mph (24kph).
A passenger said there had been "an awful jolt" when the collision took place.
Oakland Fire Department battalion chief Emon Usher told AP the stationary train had been unloading passengers when it was hit.
He said several of 16 people injured in the collision had been taken to local hospitals.
The Oakland Tribune and KTVU-TV put the number of injured at 18.  They said most had suffered bruises and bumps, with one report of a broken arm.
Authorities said the injured came from both trains.
Amtrak said it had been a "low speed" collision between the "San Joaquin" train - travelling between Bakersfield and Oakland - and the Coast Starlight, which was on its way from Los Angeles to Seattle.
The wheels of both trains' lead engines had derailed, a spokesman said.
Train traffic through Oakland Station has been suspended and emergency services and rail inspectors are at the scene.
Ireland's former world champion Martyn Irvine has retired from competitive cycling after failing to qualify for the Rio Olympics this summer.
[NEXT_CONCEPT]
Two men were rescued after becoming stranded on a crag on Snowdon's narrow Crib Goch ridge.
[NEXT_CONCEPT]
At least 16 people have been injured after two Amtrak trains collided in California, US media reports say.