"We did it. Nineteen years baby. I want to thank you very much, that's why I'm telling you first, I'm about to retire. Thank you, talk to you soon," he said in the message.
The 39-year-old, who has been struggling with an Achilles injury, later told ESPN during a brief telephone interview that he hadn't really wanted to retire but his body and age had dictated he quit.
"I'm going to miss the competition. I'm going to miss the chase for the ring. I'm actually going to miss everything," he said.
O'Neal, who was popularly known as "The Shaq," said he planned to hold a formal news conference at his home in Florida on Friday to reflect on his career as the basketball world began paying tribute to his outstanding accomplishments.
"For 19 seasons, Shaquille O'Neal was literally and figuratively an NBA giant," the NBA Commissioner David Stern said.
"On behalf of the NBA, its teams, and his millions of fans around the world, I want to thank Shaq for everything he has meant to the league and to the sport of basketball, both on and off the court."
Jerry Buss, the owner of the Los Angeles Lakers, where O'Neal won the first three of his four championship rings, also heaped praise on the center, who seems destined to be inducted into the NBA's Hall of Fame.
"Shaq had a long and amazing career, with a huge impact both on and off the court," Buss said.
"His contributions were significant to the entire NBA, but we specifically appreciate what he did with and what he meant to the Lakers during his eight years with us.
"We have three championships that we wouldn't have won without him, and we will forever be grateful for his significant contributions to those teams."
O'Neal was a physically imposing man with an infectious smile. He stood seven feet one inches tall and weighed 325 pounds (147 kilograms), and was a force under the basket.
He scored 28,596 points in the NBA, the fifth highest total, and was 12th overall in rebounds and seventh in blocked shots.
He averaged 23.7 points and 10.9 rebounds a game, was named in 15 All-Star teams and was a member of the United States team that won the gold medal at the 1996 Atlanta Olympics.
"What a career for Shaq Diesel!!" tweeted LeBron James, who briefly played alongside O'Neal at the Cleveland Cavaliers.
"The most dominating force to ever play the game. Great person to be around as well. Comedy all the time!!"
O'Neal always seemed destined for greatness after enjoying a stellar career at Louisiana State University and he was selected by the Orlando Magic as the number one pick at the 1992 NBA Draft.
In 1996, he joined the Los Angeles Lakers as a free agent, teaming up with a young Kobe Bryant in a brilliant team that won three successive NBA titles from the 1999-2000 season.
O'Neal was named as the Most Valuable Player in each of those three finals series and in 2000 he was named MVP of the entire NBA, but he left the Lakers after a fallout with Bryant.
He moved to the Miami Heat in 2004 and joined forces with another young gun, Dwyane Wade, winning a fourth championship two years later.
O'Neal also played with the Phoenix Suns and Cleveland Cavaliers before finishing off his career with the Boston Celtics, but the injuries were starting to take a toll and his averages and game time started to fall.
O'Neal earned almost $300 million salary over his career as well as another fortune in endorsements as he transcended both the sporting and entertainment worlds, giving himself a range of nicknames, including 'The Big Daddy', 'Superman' and 'The Diesel'.
He released four rap albums, appeared in films and starred in his own television reality shows, and has university degrees in arts and business, and was smart enough to know when to walk away.
"Father Time has caught up with Shaquille O'Neal," he said.
(Additional reporting by Larry Fine; Editing by Patrick Johnston)