Casemiro is the latest absence for Brazil, following injuries to Man City keeper Ederson, Arsenal striker Gabriel Martinelli and Paris St Germain defender Marquinhos, ahead of a match at Wembley on March 23 and one in Madrid's Santiago Bernabeu three days later.
"From a preliminary list of 50 names, 13 had already been ruled out by injury at their clubs," coach Junior said.
"Unfortunately, we also lost Casemiro. Pepe, from Porto, a forward by origin and now a midfielder, has been called up."
It is the 27-year-old Pepe's second call-up by Brazil, after his debut in a 2-1 loss to Colombia in a World Cup qualifier last year.
Dorival named Vasco da Gama keeper Leo Jardim, Flamengo defender Fabricio Bruno and Porto forward Galeno to replace the injured. It is the first call-up to the national side for all three players.
Squad:
Goalkeepers: Bento (Athletico-PR), Leo Jardim (Vasco da Gama), Rafael (Sao Paulo)
Defenders: Danilo (Juventus), Yan Couto (Girona), Ayrton Lucas (Flamengo), Wendell (Porto) Beraldo (Paris St Germain), Gabriel Magalhaes (Arsenal), Fabricio Bruno (Flamengo), Murilo (Palmeiras)
Midfielders: Andre (Fluminense), Andreas Pereira (Fulham), Bruno Guimaraes (Newcastle United), Douglas Luiz (Aston Villa), Joao Gomes (Wolverhampton Wanderers), Lucas Paqueta (West Ham United), Pablo Maia (Sao Paulo)
Forwards: Endrick (Palmeiras), Pepe (Porto), Galeno (Porto), Raphinha (Barcelona), Richarlison (Tottenham Hotspur), Rodrygo (Real Madrid), Savinho (Girona) and Vinicius Jr (Real Madrid).