Lawrence was included in Wales’ 26-man European Championship squad on Sunday.
However, scans on the unspecified injury showed Lawrence would not be ready for the tournament, which starts on June 11.
“James Lawrence has had to withdraw from the Euro 2020 squad due to injury,” the Football Association of Wales said on Monday.
“Following a scan yesterday it’s been revealed that he will unfortunately miss out on the final tournament with an injury that will rule him out from playing for a few weeks.
“We wish James Lawrence all the best with his recovery. Lawrence’s withdrawal gives way to Tom Lockyer who narrowly missed out on selection in the 26 named squad yesterday.”
Lawrence, who nine international caps, was a potential starter in Wales’ opening Euro 2020 game against Switzerland in Baku on June 12.
The 28-year-old started both of Wales’ 2022 World Cup qualifiers against Belgium and the Czech Republic in March.
Lockyer has won 13 caps and missed out on selection for the initial squad after injury ruled him out of the final three months of Luton’s season.
Meanwhile, Wales captain Gareth Bale admits it will be hard for his team to replicate their Euro 2016 success.
Bale and company made it to the semi-finals in their first appearance at a major tournament for 58 years.
But Real Madrid forward Bale, who spent this season on loan at Tottenham, believes a repeat of that run won’t be easy to achieve.
Wales line up in Group A alongside Italy, Switzerland and Turkey.
“We’d love to replicate it but we’re realistic,” Bale said.
“We know it’s a different tournament playing different teams and we also have a very different team to what we did have.
“It’s going to be difficult going in against all these top nations.
“But we’re confident in our own ability what we can do on the pitch, and we’ll be doing everything to make it as much of a success as we can.”