Foster's sensational opening-day effort allowed the Texans to end a six-game losing streak against Peyton Manning and the defending AFC champions.
Foster, an undrafted rookie who spent most of last season on the practice squad, had 33 carries in gaining the most yards by a Colts' opponent. He had the NFL's second-best opening weekend performance since 1933, topped only by Buffalo's O.J. Simpson's 250 in 1973 against New England. Foster also surpassed Domanick Davis' team record of 158 yards rushing, set in 2004 at Jacksonville.
Manning completed 40 of 57 passes for 433 yards, the fourth-highest opening weekend total since 1933, and three touchdowns. He threw a 10-yard TD pass to Dallas Clark with 4:54 left to cut Houston's lead to 27-17.
But Foster ran for 41 yards on the Texans' next series and capped his day with an 8-yard TD run.
The Texans (1-0) rushed for a franchise-record 260 yards and backed up their bold talk in the offseason that they were ready to challenge Indianapolis. The Colts came into the game with 15 wins in 16 games against the Texans, including rallying from 17 points down in the previous two meetings in Houston.
Foster made sure there was no Texans collapse in this one.
Houston led 13-10 at halftime and turned the offense over to Foster to start the third quarter. He rushed 10 times for 49 yards on the drive, finishing the eight-minute march with a 1-yard touchdown run.
The Colts' offensive line protected Manning better in the second half than it did in the first, and Manning guided Indianapolis inside the Texans 30.
Mario Williams sacked Manning on third down from the Texans 27, driving the Colts out of field-goal range.
The Colts punted, and Foster went over 100 yards with an 11-yard run to open the Texans' next possession. But Matt Schaub threw incomplete to Andre Johnson on third down, and Indianapolis got it back with just over 12 minutes left.
Manning completed four straight passes to move the Colts across midfield. On third down, Austin Collie caught a pass from Manning at the Texans' 10, but fumbled after a hit by safety Bernard Pollard and cornerback Glover Quin recovered.
Foster broke a 42-yard run on the next play. Slaton and Foster gained first downs on consecutive runs before Foster sprinted 25 yards to the end zone for a 27-10 lead with 8:41 left.
The Texans had been here before.
Two years ago, Houston blew a 27-10 lead in the fourth quarter when backup Sage Rosenfels had three turnovers. The Colts scored 21 points in just over two minutes and won 31-27.
On Sunday, Manning went 9-for-12 on Indianapolis' next series, and found Clark for a 10-yard touchdown with 4:54 left. Instead of letting it slip away, the Texans went back to Foster and put the game away.
Foster ran 41 yards on the drive through more huge holes. He strutted into the end zone for his final score and slammed the ball as his teammates mobbed him.
Manning threw a 73-yard touchdown pass to Collie with 1:27 left. Schaub only had to kneel on two snaps to secure the victory, perhaps a defining moment for the eight-year-old franchise thirsting for its first playoff berth.
Neil Rackers kicked two field goals in the first quarter to put Houston up 6-0.
Early in the second quarter, Schaub threw a 23-yard pass to Jacoby Jones down the sideline and found Johnson across the middle for 21 yards. With Jones and Johnson well-covered on the next play, Schaub hit Kevin Walter for a 22-yard touchdown.
Pierre Garcon made a one-handed catch inside the 10 in the final minute of the half. The Texans' defense held, and Adam Vinatieri's 20-yard field goal cut Houston's lead to 13-10.