Dykes sustained the problem during a session on Friday and scans have revealed he will not recover in time for the tournament in Germany.
The 28-year-old has nine goals in 36 caps and his absence is a blow for Scotland boss Steve Clarke just two weeks before the competition kicks off.
"Following an injury in training yesterday, Lyndon Dykes has been ruled out of the squad for UEFA Euro 2024," a Scottish Football Association statement said on Saturday.
"We're gutted for you, Lyndon, but know you'll be back in a Scotland shirt soon. Wishing you a speedy recovery."
Dykes' absence leaves Che Adams and Lawrence Shankland as Clarke's options up front, with Ben Doak also named in his provisional squad.
Clarke must name his final 26 before Friday's deadline and he may consider Bristol City's uncapped Tommy Conway or Southampton's Ross Stewart, who is only just back from a long-term injury.
Scotland play hosts Germany in the tournament opener on June 14 before facing Switzerland and Hungary in their remaining group games.