"It's the moment to change, I've spoken with (sporting director) Pedja (Mijatovic), with the president (Ramon Calderon) and I'm going," Spanish media on Friday quoted Carlos as telling radio station Onda Cero. "I'm not going to renew (my contract)."
The former Brazil defender pointed to Wednesday's 2-1 Champions League loss to Bayern Munich as the reason for his decision.
"It's a signal that God brought me to wake up, to understand that this decision is best for me," Carlos said. "I'm 33 years old and I don't deserve more suffering. I've been at this club 11 years, in which in seven-and-a-half years we won many things, but we lose one game and all of the fault has landed on me.
"I don't accept this."
The Brazilian defender received sharp criticism after Bayern forward Hasan Salihamidzic stole the ball from him moments after the opening kickoff before setting up striker Roy Makaay for the German club's first goal in just 11 seconds, the fastest goal in Champions League history.
Carlos blamed recent criticism and Madrid's elimination from yet another Champions League competition as the main motivation for not renewing his contract, which ends on June 30. Teammate David Beckham's contract also expires on that day, when the former England captain will leave to join Major League Soccer's Los Angeles Galaxy after signing a five-year deal in January.
"Given (Wednesday's) game, I felt bad, and I spoke about it a lot and at this moment my sporting career at Real Madrid is finished," Carlos said. "It is a decision I made myself. I don't want to cheat the Madrid supporters. It's better to leave Madrid now and think a little bit more about my life."
Carlos believes he has another three to four years left in him, with leagues in Brazil and Qatar as potential destinations. He said Turkish club Fenerbahce had made an offer.
"It's a delicate moment of my life. It's very sad," he said. "My family in Brazil, given (Wednesday's) match, are also very sad. Last night I arrived at 3:30 a.m. from the game, I had an injury which is the third time I've been in this same situation and on June 30th I'll take a new direction."
Knocked out of Europe and the domestic cup competition, Madrid has only the league title left to play for, where it lies fourth with 44 points, six less than Spanish league leader Sevilla and five behind FC Barcelona with 13 games to play.
Madrid goes into Saturday's match against rival Barcelona knowing a loss could spell the end of coach Fabio Capello's second stint in charge of Madrid after only eight months.
"I'm staying for Fabio," said Carlos of seeing out his contract. "To me, he is the best coach there is, but here there is a lot of pressure and criticism."
Capello brought Carlos to the club from Inter Milan in 1996 at the start of his previous stint in charge.
Since then, the Brazilian has been part of a team which won three Champions Leagues and three Spanish league titles, although it has won nothing for the last three years, reports AP.
Carlos won the World Cup with Brazil in 2002 and retired from international soccer team after the World Cup at Germany in June, having made 128 appearances for the national team.
Russia has been developing an energy module on the basis of the megawatt-class nuclear power plant since 2010. The spaceship needs neither sunlight nor solar batteries
There are legitimate authorities in Donetsk and Luhansk republics now, with which Russia can implement the project of the economic integration of the Donbass
Austria does not intend to expel Russian diplomats because of the spy scandal