Sehwag, who won the World Cup with India in 2011, played 104 Tests, 251 one-day and 19 Twenty20 internationals.
He scored 8,586 Test runs at an average of 49.34 and is the only Indian to score an international triple century.
"Cricket has been my life," Sehwag, who scored 8,273 ODI runs at 35.05, said in a statement. "I did it my way."
He will continue to play first-class cricket, saying he "still has the hunger inside", and will try to help young players coming through.
Sehwag, who had a spell with Leicestershire in 2003, has not played for India since 2013.
Media playback is not supported on this device
Test cricket's record runscorer Sachin Tendulkar, who retired in 2013, said Sehwag had been a joy to watch and play with.
Tendulkar, who made 15,921 Test runs, told the BBC World Service programme Stumped: "I would say I was in the best seat when he was batting. The non-striker's end was the best view.
"I liked his mindset, extremely positive, he always backed himself to play big shots and never changed his game. The form varies but I liked his approach. He was fantastic, a true champion and I thoroughly enjoyed having him in the team."
Tendulkar played 93 of his 200 Test matches alongside Sehwag and added: "He was always full of humour, occasionally singing songs.
"He didn't like getting tense or stressed, but he would occupy himself singing songs. Playing with him was a rollercoaster ride. You didn't know what to expect and what was round the corner."
MS Dhoni, who captained India to their World Cup victory in 2011, compared Sehwag to West Indies batting legend Sir Viv Richards.
"Didn't see Viv Richards bat in person but I can proudly say I have witnessed Virender Sehwag tearing apart the best bowling attacks," Dhoni wrote on Twitter.
Former India opener Virender Sehwag has announced his retirement from international cricket and the Indian Premier League on his 37th birthday.