Just hours after the England squad was named, Bairstow was announced as unavailable for the tournament and the rest of the domestic season, including the third test against South Africa next week at the Oval.
“Unfortunately I am going to be unavailable of all games/ tours in the immediate future,” Bairstow wrote on Instagram. "The reason being is that I have injured my lower leg in a freak accident and it shall need an operation.
“The injury came when I slipped on the golf course this morning. I am gutted and want to wish everyone for this week at The Oval all the best firstly and the boys that are going to Australia for the T20 World Cup. Absolutely gutted! I will be back."
The England and Wales Cricket Board said in a statement that Bairstow will see a specialist next week about the injury to "ascertain the full extent."
Bairstow's absence is a blow to England. He's a senior, in-form player plus the leading run-scorer in test cricket this year.
A replacement in the T20 World Cup squad going to Australia next month was not named.
Ben Duckett of Nottinghamshire was added to the squad for the third test against South Africa.
Veteran opener Jason Roy was left out of the T20 World Cup squad but he could be back in contention with Bairstow out.
Roy has had a bad summer both with England and in The Hundred, averaging 8.5 over six innings for Oval Invincibles and making three ducks.
Fast bowlers Mark Wood and Chris Woakes were included in the 15-man squad despite last featuring during the test tour of the West Indies in March.
The T20 World Cup begins on Oct. 16.
England will take 19 players for its seven-match T20 series in Pakistan starting this month — its first tour of the country since 2005 — before moving on to Australia.
Captain Jos Buttler will lead the trip but his calf injury will likely rule him out of the early stages of the Pakistan series. Moeen Ali will take over as skipper for those games.
England: Jos Buttler (captain), Moeen Ali, Harry Brook, Sam Curran, Chris Jordan, Liam Livingstone, Dawid Malan, Adil Rashid, Phil Salt, Ben Stokes, Reece Topley, David Willey, Chris Woakes, Mark Wood.