Beltran, 39, injured himself on a first-inning single. After Beltran rounded first, manager Joe Girardi and trainer Steve Donohue checked him out. Following some deliberation, he was replaced by utility man Rob Refsnyder.
Beltran said he had never felt that type of pain.
"I was concerned," he said.
Beltran is leading the Yankees in most major offensive categories. He is batting .297 with 19 homers and 53 RBIs in 73 games.
The Yankees decided to make Alex Rodriguez a part-time DH in large part because they wanted to use the DH spot for Beltran in an effort to keep him healthy. Beltran served as the DH the past two games but was in right field while A-Rod started at DH on Tuesday against Texas lefty Cole Hamels.
If Beltran's hamstring worsens and he is forced to the disabled list, it could create some intriguing possibilities for the Yankees. Aaron Judge, the team's 6-foot-7, 300-pound top outfield prospect, has been ripping the cover off the ball at Triple-A lately. Yankees GM Brian Cashman sounded hesitant to call up Judge when asked about it Monday, but Judge hit another homer later in the night to give him seven in his past nine games.
A right-handed hitter, Judge, 24, is batting .266 with 16 homers and 46 RBIs.
The Yankees could hand right field to Aaron Hicks and Refsndyer while giving A-Rod another chance to show he can hit right-handed pitching. Rodriguez was demoted from full-time DH because he has just a .584 OPS against righties.
Girardi said he had no idea yet how he will construct his lineup against Texas righty Nick Martinez on Wednesday night.