Born in Los Angeles, O'Neal is the son of former National Basketball Association player Shaquille O'Neal and Shaunie O'Neal. He has two older half-siblings, Taahirah, and Myles, and three younger siblings: Amirah, Shaqir, and Me'arah. Despite his father's basketball fame, Shareef grew up without a passion for the game and preferred skateboarding. His interest in basketball grew after he had a disappointing performance at a middle school Amateur Athletic Union game and was prompted to "prove everybody wrong" on the court. At age 13, O'Neal began training regularly and was able to dunk.
High school career
Starting in his freshman season, O'Neal played basketball for Windward School in Los Angeles at the forward position. His highlight videos immediately helped him gain popularity on the Internet and appeared in The Washington Post. However, he received limited playing time because the team's six seniors earned the most minutes. Head coach Steve Smith viewed O'Neal's first season with Windward as a "learning year" and expected him to assume a larger role in the following season. At the end of the season, he was averaging 3.7 points and 2.9 rebounds per game. In May 2015, O'Neal received a scholarship offer from USC, his first from an NCAA Division I program. In the following months, he had additional offers from Baylor, LSU, UCLA, and Kansas State. O'Neal remained with Windward as a sophomore and saw significant improvement. In October 2015, at a tournament in Fairfax High School that featured many top high school teams in the nation, O'Neal scored 23 points in a loss to Bishop Alemany. O'Neal, in December, drew attention from scouts at the MaxPreps Holiday Classic despite his team's struggles. He became known as a versatile swingman with ball-handling, shooting, and defending skills. On June 29, 2016, the Los Angeles Times announced that O'Neal would transfer to Crossroads School in Santa Monica. He joined the team expected to take a leading role with top high school recruit Ira Lee. On January 6, 2017, O'Neal scored 15 points in a 54–50 win over Brentwood. In a 44–80 loss to Mater Dei on February 17, he scored 20 points in a matchup with Bol Bol, son of former NBA player Manute Bol.
Recruiting
In April 2017, O'Neal committed to play college basketball for Arizona. On February 24, 2018, he decommitted from Arizona immediately following allegations by ESPN that FBI wiretaps had intercepted phone conversations between Arizona coach Sean Miller and an agent discussing paying $100,000 to ensure star player Deandre Ayton signed with Arizona. Because he signed a nonbinding financial aid agreement with Arizona instead of a formal letter of intent, he did not require a release from Arizona to seek out a new school. O'Neal verbally committed to UCLA on February 27, but he did not sign a National Letter of Intent during the signing period that ended on May 16. He signed with the Bruins in August.
College career
During practices over the summer, O'Neal "felt funny", and was given a heart monitor by doctors to wear. On September 28, 2018, UCLA announced that he would miss the 2018–19 season but remain enrolled at the school as a medical redshirt. He was diagnosed with a heart condition by the UCLA medical staff, and underwent surgery in December. He played in the Drew League over the summer, and later in the Bruins' exhibition game. He wore a monitoring device during practice for post-surgery research on his heart but did not wear it during games. In April 2019, UCLA hired Mick Cronin as their head coach to replace the fired Steve Alford. O'Neal made his UCLA debut in the 2019–20 season opener, playing six minutes without scoring against Long Beach State. On December 14, 2019, he had his best game of the season with eight points and a career-high 11 rebounds in a loss against Notre Dame. In a win against California on January 19, 2020, Cronin elected not to play O'Neal for the fifth time during the season. On January 22, O'Neal announced that he was leaving UCLA. He averaged 2.2 points and 2.9 rebounds in 10.2 minutes per game as a reserve for the Bruins, who were 9–9 at the time. On February 14, 2020, O'Neal announced his plans to transfer to LSU, where his father played college basketball.