Castellini started his career at hometown club A.C. Perugia. He stayed at the club for 4 Serie C1 seasons. In mid-1994, he joined Parma A.C. of Serie A, which he made his debut on 18 September 1994, in a 2–1 home win against Cagliari Calcio. Castellini had limited chance in the 1994–95 UEFA Cup winner and 1995–96 UEFA Cup Winners' Cup quarter-finalists. In 1996–97 season, he rejoined Perugia which won promotion to Serie A last season.
Owing to Perugia failing to protect its place in Serie A, he was signed by Sampdoria. With the Genoese side he played two Serie A seasons, but in the second season Sampdoria conceded the third largest number of goals in the season, and the side was relegated to Serie B. The Blucerchiati failed to return to Serie A but finished fifth, thus Castellini was signed by Serie A struggler Bologna.
Bologna
In 2001–02 season, Bologna finished 7th and qualified for 2002 UEFA Intertoto Cup. Castellini played at the finals which lost to Fulham F.C. in a 3–5 aggregate. The 2002–03 season Bologna once again protect his place in Serie A.
Parma return
In August 2003, Castellini was re-signed by UEFA Cup competitor Parma for a reported 3-year contract. At Parma, Castellini played 32 Serie A matches and 3 games in 2003–04 UEFA Cup, in although the club already have young talents likes Daniele Bonera and Paolo Cannavaro, Castellini played regularly along with Matteo Ferrari. During the season, he was call-up to national teamfor the first time and played against Romania. Italy at that time qualified for UEFA Euro 2004 and aimed to find the best squad to the tournament. The friendly match ended in 1–0 won and Castellini played as Fabio Cannavaro's substitute in the 55th minute. He received another call-up in March 2004 but withdrew duo to injury.
Sampdoria return
As Parma faced financial difficulty as their sponsor Parmalat was facing scandal, Matteo Ferrari and Castellini, one of the backbone of the defensive line, were turned to cash and washed out to decrease wage expense. Castellini re-joined Sampdoria for just €0.8million. At Sampdoria he played 22 Serie A as Castellini missed the field in October and in March. He also played once in Serie A only in November. With the effort of Francesco Antonioli and other members of the defensive line including Castellini, the Genoese team finished fifth and conceded the third fewest goals. In the second season, Castellini played 33 league matches but just played three out of six UEFA Cup matches.
Bologna return
A surplus for young Sampdoria, Along with Francesco Antonioli, Castellini were signed by Serie A newcomer Bologna in June 2006. This time at Serie B. The defensive duo made a contribution to the team to win promotion to Serie A again in 2008 by conceding the fewest goals along with U.S. Lecce, But Castellini was too old for the Italian top division and he just made 13 appearances. Along with Antonioli, the duo released again after Bologna almost failed to avoid relegation back to Serie B.
International career
Castellini made his only senior international appearance for Italy under manager Giovanni Trapattoni, on 16 November 2003, in a 1–0 friendly home win over Romania.