The game at the Estadio Cuscatlán is the first confirmed match for Miami ahead of the MLS season, which is expected to begin in late February.
"We're excited to start announcing our preseason plans and preparations ahead of a thrilling 2024 campaign," Inter Miami chief soccer officer and sporting director Chris Henderson said.
"We look forward to facing the El Salvador national team in what will be a good first test for our squad against the best players from the country."
The announcement follows Miami's denial last week that it had agreed to take part in the Riyadh Season Cup in Saudi Arabia in February. Event organizers had announced that Messi and Miami would face off against Cristiano Ronaldo's Saudi Pro League team Al Nassr as part of the event.
Miami, though, said the announcement was "inaccurate" but that it looked forward to "showcasing our players on Inter Miami CF's first international tour which will be announced in the coming weeks."
Inter Miami, which failed to make the MLS playoffs, finished the 2023 season with a loss to Charlotte FC on Oct. 21. The club then took on New York City FC in a friendly on Nov. 10 to celebrate Messi's record-extending eighth Ballon d'or award.
Despite failing to make the postseason, Messi made a huge impression when joining the club along with fellow former Barcelona stars Sergio Busquets and Jordi Alba in July. Messi scored 10 goals to lead Miami to its first-ever title with the Leagues Cup as fans across the U.S. clamored to see the Argentine World Cup winner in action.
El Salvador is ranked 78th in the latest FIFA rankings and most recently drew home and away against Curaçao earlier this month.
Also on Thursday, Miami announced that it has sold out season tickets for 2024, just over two weeks after they went on sale.