Castiglia began to earn first-team call-ups during the 2007–08 Serie A campaign, by then coach, Claudio Ranieri. His senior debut came on 27 January 2008, when he came on as a substitute in a 1–3 away victory over Livorno in Serie A league match. He made one other senior appearance in Serie A for the club, coming on as an 89th minute substitute in a 3–3 draw at Sampdoria on the final matchday of the 2007–08 Serie A season. He also made his debut in the UEFA Champions League during the 2008–09 edition, coming on a substitute in a 0–0 draw with BATE Borisov. In February 2009, he helped guide the Juventus Primavera team to win the "Viareggio Cup".