The 38-year-old Swiss had defeated Dimitrov in all seven previous meetings but surrendered a two sets to one lead before sliding to a 3-6, 6-4, 3-6, 6-4, 6-2 defeat.
Federer, a five-time US Open champion, left the court for a private medical timeout to treat his upper back near his neck before the final set but refused to blame injury as the reason for his exit.
"I felt it the whole time. I was able to play with it. My bad not to win," Federer said.
"This is Grigor's moment and not my body's moment, so it's OK.
"It's how it goes. I tried my best. By far not too bad to give up or anything. Grigor was able to put me away. I fought with what I had."
Djokovic says 'life goes on' as injury wrecks US Open defense
Federer was denied on five break points in the 10th game of the fourth set and the 78th-ranked Dimitrov held to force a fifth set, before the Bulgarian broke his rival twice in succession to effectively seal victory.
"Had moments that I was in the lead most of the time. Had a chance to come back in the fourth. Start of the fourth wasn't ideal. Start of the fifth wasn't ideal. That was running behind. That was tough," Federer said.
"Just disappointed it's over because I did feel like I was actually playing really well after a couple of rocky starts.
"It's just a missed opportunity to some extent that you're in the lead, you can get through, you have two days off after. It was looking good. But got to take the losses. They're part of the game."
Federer's most stinging loss came at the Wimbledon final in July, when he squandered two match points while serving for trophy against Novak Djokovic.
He was adamant he had moved on from that near-miss, insisting it had no bearing on his performance against Dimitrov, the lowest-ranked US Open semi-finalist since Jimmy Connors (174th) in 1991.
"I know people read into it. They think, all that stuff. That is definitely not the reason why I lost tonight. I was ready to go, try my best. It wasn't enough," Federer said.
Asked whether he felt he would have further chances to add to his record haul of 20 men's Grand Slam singles title, Federer replied: "I don't have the crystal ball."
"We never know. I hope so, of course. I think still it's been a positive season. Disappointing now, but I'll get back up, I'll be all right," he added.
Record chase can motivate Federer but wins matter most
Federer has already qualified for a record-extending 17th ATP Tour Finals appearance in London -- alongside Novak Djokovic, Rafael Nadal and Daniil Medvedev -- and has no immediate plans to scale back his end-of-season commitments.
"I guess Laver Cup, Shanghai, Basel, maybe Paris, London. That's the schedule for now," he said.
"I don't know if the team have other ideas or not. I'm happy to get a bit of a break now, go back to practice, reassess and attack from there."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ