The Texans are on an 11-game losing streak, with the 27-20 defeat to the Jacksonville Jaguars the final straw for McNair, but the chairman expressed regret that the partnership had to end the way that it did.
"I want to thank Gary Kubiak," McNair told the Texans' official website. "Gary, he has brought this team to a new level. We've had two division championships. We've had some outstanding performance. It's been a job that he has totally committed and he's put everything, his whole being into it.
"We couldn't ask for more out of anyone and it's very disappointing that he's not going to be with us in the future. I truly felt that he would be with us until it was time for him to retire.
"And so I'm disappointed for him and for his family that it didn't work out this way. But we have to do what's best for the organisation and we will always do that. We're here to have a winning culture and this year does not contribute to that."
The Texans are 2-11 for the season so far.