Aldridge made the announcement in a statement on his Twitter account, noting that he last played April 10 against the Los Angeles Lakers while dealing with the heart condition.
"Though I'm better now, what I felt with my heart that night was still one of the scariest things I've experienced," Aldridge wrote.
"With that being said, I've made the difficult decision to retire from the NBA. For 15 years, I've put basketball first, and now, it is time to put my health and family first."
Aldridge, 35, signed with the Nets on March 28 after he was bought out by the San Antonio Spurs and appeared in five games for Steve Nash's side.
A seven-time All-Star and two-time All-NBA second-team selection, Aldridge enjoyed his best years with the Portland Trail Blazers and Spurs. The Texas Longhorns product was drafted with the second pick in 2006 by the Chicago Bulls and subsequently traded to Portland for fourth overall pick Tyrus Thomas and Viktor Khryapa.
"I'm thankful for everything this game has given me: the great memories, including all the ups and downs, and the friendships I've made and will keep with me forever," Aldridge's statement added.
"I thank Portland for drafting a skinny Texas kid and giving him a chance. The city of Portland has given me some unforgettable years. They will always remain in my heart."
Aldridge signed a four-year, $80-million contract with the Spurs in July 2015 and went on to play five full seasons under Gregg Popovich that included four playoff appearances.
"I want to thank the Spurs for letting me into the family and giving me five fun years," Aldridge said.
He added, "You never know when something will come to an end, so make sure you enjoy it every day. I can truly say I did just that."