Nationals skipper Davey Martinez said after the game that Strasburg's throwing shoulder tightened up on him. An MRI is set for Saturday.
Strasburg said he's been dealing with the issue prior to Friday.
"You're not going to feel 100 percent every time, but I think it's just been something that's been a gradual process and it's been affecting me more and more over the last three or four starts,'' Strasburg said, "and it's a tough one to gauge because you want to go out there and do your part.''
"Today it acted up on me a little bit more than the other ones and Davey decided to pull the plug,'' he said.
Strasburg allowed three runs and five hits with two strikeouts and did not look comfortable on the mound.
Andrew McCutchen gave the Giants a 1-0 lead in the first inning when he homered off a 97 mph fastball, and San Francisco opened the second inning with four straight hits to make it 3-0.
The 29-year-old Strasburg has been excellent when healthy, going 15-4 in both of the two past season. But he hasn't made 30 starts in a year since 2014 when he made 34.
Strasburg has made five trips to the disabled list since 2015. Neither Martinez or Strasburg were forecasting the MRI result.
"Hopefully, it's nothing at all,'' Martinez said. "Just a little tightness, a little inflammation, we can take care of it and then we'll go from there.''
In his previous start, Strasburg took the loss at Atlanta after allowing four runs and seven hits in 6 2/3 innings.
Friday was the eighth anniversary of Strasburg's major league debut.
The Associated Press contributed to this report.