After delivering his second ball of the 22nd over, with Pakistan 68 for two, the Durham pace bowler pulled up with a right calf strain.
Stokes, returning to Test cricket this match after suffering a knee injury in the series opener against Sri Lanka at Headingley in May, grimaced in pain.
The England physiotherapist came onto the field but, after a few minutes' treatment, escorted the 25-year-old off.
There remains a possibility that Stokes could play on Tuesday, if the match goes into a fifth day, but his injury looked a serious one.
More From This Section
Off-spinner Moeen Ali, completing the over, was then hit for six by Mohammad Hafeez.
Two balls later Ali bowled a no-ball full toss that sailed above Hafeez's head.
A second full toss above waist-high would see Ali barred from bowling in the rest of the innings and, with Stokes injured, leave England down to just three frontline bowlers.
The third Test at Edgbaston starts on August 3.