Alexandru Maxim scored twice and Antonio Ruediger grabbed the other goal as Stuttgart gave former youth team coach Thomas Schneider a rousing start to his Bundesliga career after he replaced Bruno Labbadia, who was fired on Monday.
Stuttgart were quickly off the mark as defender Ruediger opened the scoring and Ibisevic, who spent four-and-a-half seasons at Hoffenheim, headed the second from Maxim's corner in the first 20 minutes.
Casteels needlessly came out of his area to try to clear a long pass forward, missed the ball and Maxim scored into an empty net.
There was no let-up for Hoffenheim after the break as Ibisevic struck again, then Maxim curled in his second from the edge of the area and the Bosnia forward completed his hat-trick with a header just after the hour.
Roberto Firmino pulled one back for Hoffenheim three minutes from the end as they suffered their first defeat of the season.