The move has been an open secret with Alonso entering rallies in South Africa and Morocco as preparation with fellow Spaniard and former Dakar motorcycle winner Marc Coma as co-driver.
The Dakar Rally has come a long way since its origins as a race from Paris to Senegal, with the 2020 edition taking place in Saudi Arabia for the first time after moving from South America.
Alonso's entry was announced ahead of this weekend's Spanish round of the rally world championship.
The Spaniard is also seeking to win the Indianapolis 500 to complete the so-called Triple Crown of Motorsport, after winning the other two parts at Le Mans and in Formula One.
The 38-year-old hung up his helmet as a McLaren Formula One driver last year.
Qatar's Nasser al-Attiyah, a three times winner, is the reigning Dakar champion and is also returning with Toyota.