The dance act will play at the event, which is on the country's east coast between Valencia and Barcelona, on the weekend of 16-19 July.
Florence and the Machine, Portishead, Crystal Fighters and Noel Gallagher's High Flying Birds will also be there.
The Prodigy release their sixth studio album, The Day Is My Enemy, on 30 March.
Their new single Nasty, their first since 2009, is out now.
It was Radio 1's track of the day earlier this month and was Zane Lowe's Hottest Record after the track had its first play on his show.
The band is made up of Liam Howlett (keyboardist and composer), Keith Flint (dancer and vocalist), and Maxim Reality (MC and vocalist) with Leo Crabtree (drums) and Rob Holliday (lead guitarist) playing live.
Ahead of their trip to Benicassim, they're performing across Europe in April before playing 10 dates in the UK the following month.
That tour starts in Newcastle on 4 May before ending with two gigs at London's Alexandra Palace on 15/16 May.
The Prodigy are also co-headlining the Friday night of this year's Isle of Wight Festival with The Black Keys on 12 June and are in Australia at the end of February and beginning of March.
Tickets for Benicassim cost around 130 euros (Â£97) for four days.
Follow @BBCNewsbeat on Twitter, BBCNewsbeat on Instagram and Radio1Newsbeat on YouTube
The Prodigy have been announced as the first headliners of this year's Benicassim Festival in Spain.