Nicaragua's Juan Barrera converted a goal in the 91st-minute penalty to put a blemish on Argentina's performance.
Scaloni, brought in after Jorge Sampaoli was sacked following a disastrous showing at the World Cup last summer, is aiming to build a younger team and end Argentina's 26-year wait for a trophy.
However, Argentina will hope that Messi is in full flow in the Copa America to help the South Americans win the coveted title. With Brazil's Neymar ruled out of the tournament because of injury, Argentina are starting this tournament as one of the favourites. Messi doubles his side lead a minutes later after Sergio Agüero's shot is deflected to the Barcelona man, and makes a simple finish with two goals in a span of minutes before the Argentina skipper he was replace by Juventus forward Paulo Dybala eight minutes later.
Lautaro Martinez came off the bench and scored a second-half brace against the visitors, while Roberto Pereyra added a fifth late.
Argentina take on Colombia in their opening Copa America match in Salvador and also face Paraguay and Qatar in Group B.