The deal, which starts this season, will pay Watt a guaranteed $51.8 million, the most for a defensive player in the history of the NFL. The $16.6 million annual value also is the highest for a defensive player.
Watt, the 11th selection in the 2011 draft and the 2012 defensive player of the year, said in August that he hoped he had earned a new contract.
"With the new [collective bargaining agreement], I think one of the goals was to make guys earn their pay," Watt said. "No more big paydays up front. Make guys go out there and play, show that they've earned it.
"So I think when a team gives a big contract after the third year, they're saying, 'Listen, we think you've earned this.' I don't know if [the Texans] feel that way or not, but I sure hope I've put in all the work, and I've put in everything I can do to hopefully earn it."
Also in August, Texans owner Bob McNair said the team would redo Watt's deal early if it made sense for the team. However, he added that the team would be willing to use the franchise tag on Watt after the 2015 season (the final year of the DE's rookie deal), twice if necessary. Players who aren't quarterbacks can't be tagged more than twice.
"It's going to be a big contract," McNair said at the time. "If we can do something with him that makes sense for the team to do it early, we'll certainly do it.
"It has to make sense for us. The team comes first. We want to keep all of our players. We want to take care of all or our players, but the team comes first."
The Texans picked up a fifth-year option on Watt's contract in May that locked him in at a salary of $6.969 million for the 2015 season. The sides had some preliminary discussions before the team picked up the option.
The Houston Chronicle first reported the parties had reached agreement Monday night.
Watt, one of the best defensive linemen in the NFL and perhaps the best interior lineman in a 3-4 system, said last month that he wouldn't hold out to force the Texans to renegotiate his contract.
"That would cause me to miss time with my teammates," he said. "Right now, I want to practice. I want to be out here with these young guys. I want to teach them things that I know. I want to better myself. And it hasn't really come to that. I want to be a Houston Texan. I want to play football, I want to be the best I can be. I can't do that by sitting on my couch. I want to come out here and help my team.
"The business side of things is the business side. Right now I'm in football mode, so I worry about that. If the time comes that I need to get involved in the business side, I will."
Both sides wanted Watt in Houston for as long as possible.
"I sure would like to be," Watt said previously. "I love the fans that we have. I love the relationship we have. The city is so great. The way that they've treated myself and my family, I couldn't ask for a better place to play."
"We want him here for a long time," McNair said.
ESPN's Chris Mortensen and ESPN.com's Tania Ganguli contributed to this report.