Zimmermann abruptly left in the fourth inning of an eventual 6-2 loss. He will be further evaluated and have an MRI on Saturday.
He was scheduled to participate in his second straight All-Star Game but now isn't expected to pitch Tuesday in Minneapolis, manager Matt Williams said.
Zimmermann, who had Tommy John surgery in August 2009, called the Nationals' training staff out after throwing a pitch to Cameron Rupp with one out in the fourth inning. He showed no obvious discomfort but left the mound after a short discussion with the training staff and Williams.
Zimmermann (6-5, 3.03 ERA) doesn't feel the problem is related to his shoulder or elbow.
"It was gradually getting worse with every pitch," he said. "I knew something wasn't right. I didn't want to push it too far."
He said not pitching in the All-Star Game would be a disappointment.
"Obviously, you want to go," he said. "I had all my plans made and I wanted to pitch in front of my family. But the main thing is to get healthy."
Zimmermann left after allowing four runs and six hits. He threw 53 pitches, 36 for strikes.
"I feel OK now," he said. "I don't think it's anything major. Hopefully, the MRI comes out good."
Zimmermann has a 1.26 ERA since June 1 with 46 strikeouts and seven walks in 50 innings over seven starts. But he gave up four runs and six hits in 3 1/3 innings against the Phillies.
The Associated Press contributed to this report.