The two home nations are on Euro 2016 qualification duty four days later.
Gordon Strachan's side host Gibraltar on Sunday 29 March and Michael O'Neill's Northern Ireland welcome Finland on the same day.
Strachan said: "Playing Northern Ireland, a national side full of confidence, will be a good challenge for our team."
O'Neill's side are second in Group F, one point behind leaders Romania after four games, while Scotland are third in Group D, three points adrift of leaders Poland.
"There will obviously be a British derby feel to the game, which brings an added competitive edge, and that is exactly what we are looking for before we resume our qualifying campaign against Gibraltar," said the Scotland manager.
"We have enjoyed a good 2014 and now we will work together - the coaches, players and supporters - to make it an even better 2015."
Scotland have played their recent internationals at club grounds after Hampden was converted to an athletics stadium for this summer's Commonwealth Games.
However, the athletics track has been moved and Strachan said: "We have thoroughly enjoyed our travels to Ibrox and Celtic Park - two top-class football stadia.
"But we are also looking forward to getting back to our home ground of Hampden Park and we look forward to having that excellent support behind us again for the second half of our campaign."
The last time the sides met was at Dublin's Aviva Stadium in February 2011, the Scots winning 3-0 in the Carling Nations Cup, but O'Neill's side will arrive in Glasgow with renewed confidence.
"This is an excellent match for us prior to the Finland qualifier," said the 45-year-old who played midfield for six Scottish clubs as well as managing Brechin City.
"It will have been just over four months since we were all together in Bucharest, so a testing game against local opponents will give us good preparation for the qualifier later in the week.
"In addition, Glasgow is so close to Northern Ireland, so we would hope to see a good travelling support, which always adds noise and colour to our away games and is appreciated by the players."
Scotland will face Northern Ireland in a friendly at Hampden Park on 25 March, the Scottish FA has confirmed.