Casemiro picked up the injury in the opening period of Wednesday's 3-0 loss to Newcastle United in the Carabao Cup and was replaced by Sofyan Amrabat at halftime.
The 31-year-old is surprisingly Manchester United's top scorer this season with four goals in 12 appearances.
An ankle injury picked up on international duty with Brazil had also seen Casemiro miss out on Manchester United's last two Premier League games against Sheffield United and Manchester City.
The club released an official statement that read: "Casemiro will be out for several weeks due to a hamstring injury suffered during our Carabao Cup defeat to Newcastle United on Wednesday.
"The Brazilian midfielder was withdrawn at half-time due to the issue, and subsequent assessment has revealed a strain that will keep him out for a number of weeks."
Manchester United are away to Fulham in the Premier League on Saturday looking to ease the pressure on manager Erik Ten Hag with a win at Craven Cottage.