Coach Gary Kubiak said Williams will go on injured reserve and undergo surgery in the next week.
Williams appeared to be hurt while sacking Jason Campbell with about five minutes left in the first quarter. He walked to the locker room on his own, and was on the sideline in the second half, wearing a T-shirt and shorts.
Williams, the top overall pick in the 2006 draft, moved from defensive end to outside linebacker this season in new coordinator Wade Phillips' 3-4 alignment. He was growing more comfortable with the role each week, and had five sacks and a forced fumble before the injury.
"I feel so bad for Mario, because he's such a heck of a player," Kubiak said Monday. "He had really taken to the position he's playing. He was improving every day in practice, improving in every game. I'd never seen him so upbeat about what was going on."
The Texans (3-2) play at Baltimore (3-1) on Sunday, and Williams isn't their only injury concern.
Quarterback Matt Schaub has a sore throwing shoulder and a thigh bruise, and fullback James Casey left Sunday's game with a strained pectoral muscle. Kubiak said both players are "day to day."
Right guard Mike Brisiel left Sunday's game with injuries to his ankle and knee, and Kubiak said he will be re-evaluated on Wednesday.
The Texans were already playing without star receiver Andre Johnson, who injured his right hamstring in last week's win over Pittsburgh. Kubiak said Johnson is no longer sore after a minor procedure last Tuesday, but he couldn't say if Johnson could be ready in time for Sunday's game against the Ravens.
"His rehab has picked up," Kubiak said, "so we'll see where he's at each day."
The loss of Williams is a major blow to a defense that had showed vast improvement from last season.
For the second straight year, Houston is losing one of its defensive stalwarts after a promising start. In 2010, All-Pro linebacker DeMeco Ryans tore his left Achilles tendon in the sixth game, and the Texans dropped eight of their last 10 to finish 6-10.
The 6-foot-6, 285-pound Williams is Houston's all-time sacks leader (53). He set the team's single-season sacks record with 14 in 2007, and was named a Pro Bowl starter in 2009 and `10.
"I'm disappointed for Mario," Kubiak said. "Obviously, it's tough on the team. We're missing a great player."
Rookie Brooks Reed, a second-round draft pick, will move into Williams' spot in the starting lineup. Reed had four tackles in about 50 plays in Sunday's game.
"It's a great opportunity here in his young career to step up and be a starter," Kubiak said. "That's why we drafted him. (He's) very capable of doing it. He'll get his opportunity here."
Kubiak said the Texans may bring linebacker Jesse Nading off the practice squad to add depth. Kubiak will meet with general manager Rick Smith and owner Bob McNair to discuss other possible roster moves.
"We've got a lot of things to look at right now," Kubiak said. "We've got some challenges from a management standpoint, me and Rick and Bob, as we sit here and have to juggle some things as we move forward with these injuries and some of the things going on."
Casey, a converted tight end, had developed into a dependable offensive option and was Houston's third-leading receiver coming into the game.
Backup fullback Lawrence Vickers dropped an easy pass from Schaub inside the 15-yard line with Houston down 25-17 in the fourth quarter. The Texans settled for Neil Rackers' field goal on the drive.
"It was a play called for the fullback to be open in the flats and Coach (Kubiak) gave me my opportunity and I let my teammates down," Vickers said after the game. "It hurts, but I deserve to feel like this right now."
The Texans acquired Vickers as a free agent early in training camp, after Vonta Leach signed with the Ravens. Vickers played five seasons in Cleveland before coming here, and Kubiak still thinks he can depend on the veteran.
"He's started in this league, he has a lot of starts at fullback," Kubiak said. "That's why we brought him in here, and he'll get a lot of work now. He's been working with James. He's a little bit of a different player than James.
"But I've got a lot of confidence in him," Kubiak said. "When somebody goes down, the next guy's got to step up, you've got to keep going."