Credit: Jill Ann Spaulding/FilmMagic

Charlie Sheen is selling the Beverly Hills house that he bought for ex-wife Brooke Mueller and their twin 6-year-old sons, Bob and Max, a source close to the actor confirms to Us Weekly — and any money from that sale will go directly to his children.

“Charlie only has one house,” the source tells Us. “The other two houses were each bought as a trust for his kids, one for Sam and Lola and the other for Bob and Max, and are controlled by their mothers [Denise Richards and Brooke Mueller, respectively]. If the houses are sold, the money goes right to his kids.”

Sheen and Mueller tied the knot in 2008 but called off their marriage in 2011 following a tumultuous few years. On Christmas Day 2009, the couple quarreled, and Mueller famously told police in a 911 call that she thought the actor was going to kill her. The pair now have an amicable relationship.

The source adds that the former Two and a Half Men star always has his children’s best interests at heart.

“Charlie has been extremely generous to his kids and always has taken care of them,” the source says. “He still sees them and wants to have a strong relationship with them. He always puts his kids first now. So the houses don’t have anything to do with the extortion."

In addition to Bob and Max, Sheen is father to daughters Sam, 11, and Lola, 10, with Richards. He also has a grown daughter, Cassandra, 30, who he shares with high school sweetheart Paula Profit.

Earlier this month, the 50-year-old actor revealed on the Today show that he is HIV-positive, and explained that he’s been extorted for upwards of $10 million over the years by people looking to cash in on their knowledge of his condition.

“What people forget is that’s money they’re taking from my children,” he told Today show host Matt Lauer. “They think it’s just me, but I’ve got five kids and a granddaughter. …I release myself from this prison today.”

Can't get enough of Us? Sign up now for the Us Weekly newsletter packed with the latest celeb news, hot pics, and more!