The British No 1 from Beverley, East Yorkshire, who has never made the last 16 at Roland Garros, was edged out 6-3 4-6 3-6 6-4 6-4 by Italy’s Fognini.
Edmund was serving at 4-5 in the final set when he missed a forehand to give Fognini three match points.
Having saved one, he then pushed another forehand long to hand Fognini victory and bow out in the third round for the third consecutive year.
“Always losing in five sets is tough. But I did the best I could,” the 23-year-old said.
“Sometimes it’s just not your day. I have been on the opposite end, winning a few five-setters, and today just losing one.
“It’s always tough when you put in lots of effort and emotion. It’s what you train for.
“I had my chances, he had his chances, but he just got them. I had break points in the fifth, I just couldn’t get them, and when he had his break points he obviously did.
“The margin is always very small. I have won some tight matches this year and this one is a close one I have lost.”
Edmund’s final shot was the 108th unforced error of a curious match, full of peaks and troughs from both players.
Edmund, who contributed 48 of those errors, seemed tetchier than usual, appearing distracted by camera clicks from courtside photographers as he went to serve.
Fognini is famed for his fiery temper and did not disappoint, hurling his racket against the back wall after one rally went begging – but that was fairly tame for a man thrown out of the US Open last year for his bad behaviour.
There was more disappointment for Britain with Jamie Murray and his partner Bruno Soares losing in the men’s doubles to Maximu Gonzalez and Nicolas Jarry.
Heather Watson and her partner Tatjana Maria also lost, against Barbora Krejcikova and Katerina Siniakova.
And Johanna Konta pulled out of her mixed doubles match with Dominic Inglot due to a precaution due to injury, handing Maria Jose Martinez Sanchez and Marcelo Demoliner a walkover.
Novak Djokovic eased into the quarter-finals in straight sets 6-3 6-4 6-2 against Fernando Verdasco.
The 2016 Paris champion is still not at his dynamic best following a long absence due to an elbow problem, but he did not have to be to get past the 30th seed.
Alexander Zverev has become marathon man of Roland Garros after coming through another five-setter to book his place in the quarter-final.
The 21-year-old German, seen along with Djokovic as one of the few obstacles to Rafael Nadal claiming an 11th title, was 2-1 down in sets for the third straight match, this time against Karen Khachanov.
But second seed Zverev roared back to oust the 6ft 6ins Russian, ranked 38 in the world, 4-6 7-6 (7/4) 2-6 6-3 6-3.
Despite his lofty seeding this is the first time Zverev had reached the last eight of a grand slam.
He has now played 18 sets to Nadal’s nine, with the Spaniard facing unseeded German Max Marterer on Monday in his fourth-round tie.
Zverev’s opponent in the last eight will be Austrian seventh seed Dominic Thiem, who overcame Kei Nishikori of Japan 6-2 6-0 5-7 6-4.
American duo Sloane Stephens and Madison Keys reached the quarter-finals for the first time.
But second seed Caroline Wozniacki is in danger of being knocked out in the fourth round.
Stephens, who beat Keys in last year’s US Open final, hammered Anett Kontaveit of Estonia 6-2 6-0 in just 52 minutes.
She will meet the winner of the clash between Wozniacki and 21-year-old Russian Daria Kasatkina.
But Wozniacki has her work cut out having dropped the first set against Kasatkina, a former junior champion at Roland Garros, and was 3-3 in the second set before bad light stopped play.
Keys secured her first appearance in the last eight after dispatching Romania’s Mihaela Buzarnescu 6-1 6-4 in an hour and five minutes.