The Belgian, who is set to return to racing at La Flèche Wallonne after a short break, made his announcement at Amstel Gold Race, citing a desire to spend more time with his family and the sacrifices he has made during his career as reasons to stop.
Gilbert, 39 in July, announced his decision on air on Vivacité, RTBF's radio station, during Sunday's race.
"At some point I have to stop," he said.
"It will be 20 years of my career. You have to think that cycling is not the only thing in life. There is also my family. I have sacrificed a lot in my life and it's time to enjoy it."
Gilbert said that he was sad to miss Amstel Gold Race, which he has won four times in the past, having taken a break after Gent-Wevelgem, citing physical and mental fatigue after rehabilitation from a fractured kneecap sustained at last year's Tour de France.
"Yes," he said answering a question about 2022 being his last year.
"That's why sometimes it's difficult to say that you have to miss races like today's. These are races that are close to my heart. I would have been very happy to be at the start."
Gilbert will get back to racing on Wednesday for Flèche, a race which he has won on one occasion – back in 2011 – before continuing at Liège-Bastogne-Liège, where he completed a famous Ardennes triple in the same year.
After three weeks of rest, Gilbert said he's unsure what level he'll be at upon his return, though noted that the break was necessary in order to return to racing at a strong level.
"I had a lot of pain and it was hard to get back," he said.
"I paid for all those kilometres where I kept riding with a huge pain in my knee. I had a large pain load for many months and my body said stop. The decision I made with my team to take this micro break was the right one. I hope to come back with better sensations.
"I took a few days of complete rest and then I did some rides of more than 6 hours to improve my endurance. Physically, I won't be too bad, but I am aware that I will miss some preparatory races like the Basque Country. It is a race that helps a lot.
"I will start without any clear ambition, but first of all with the idea of having fun and going as far as possible. Perhaps racing without pressure will give me a certain freedom. I hope that I will still be there in the final of these two beautiful Classics."
Thank you for signing up to Cycling News. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.