Djibouti played its first international match under the name French Somaliland, at home against neighbouring Ethiopia on 5 December 1947 and lost 5-0. This was also Ethiopia's debut. The two played again in Djibouti on 1 June 1948 and Ethiopia won 2-1. On 1 May 1949, the fixture was played for the Emperor Cup in Ethiopia, and the host won 6-0. In 1954, Djibouti played Ethiopia three times: a 10-1 away loss on 1 May, a 2-0 home loss on 1 June and a 2-1 home loss the day after. Djibouti did not play a match again until 1960, when it entered a tournament for French-speaking countries held in Madagascar. The team lost 9-2 in the first round to Cameroon on 13 April. This was the squad's last game as French Somaliland.
After gaining independence in 1977, the team played under the name Djibouti for the first time against Ethiopia in an away match on 27 March 1983 and lost 8-1. The two played again two days later with Ethiopia again victorious, by 4-2. After a third friendly against Ethiopia, a 2-0 home defeat on 23 March 1984, Djibouti entered a tournament in Ethiopia against the host and Zimbabwe. They lost 2-0 to Ethiopia on 3 June and then 3-1 to Zimbabwe on 7 June.
In 1986, Djibouti hosted three friendlies against Ethiopia, losing 5-1 on 14 March. It later earned its first draw (1-1) on 18 March. The squad lost the third friendly 2-0 on 3 June. On 9 August, the team played its first ever African Games qualifier for the 1987 All-Africa Games in Kenya and lost 7-1. Djibouti did not play another international until 26 February 1988, beating South Yemen 4-1 at home for their first ever victory.
Djibouti's first appearance at the CECAFA Cup, a local competition for nations in East and Central Africa, was in Kenya in 1994. These were its first matches since defeating South Yemen in 1988. The Djibouti squad lost 4-1 to the hosts on 28 November, 2-1 to Somalia on 1 December, and 3-0 to Tanzania on 3 December. Djibouti did not advance to the next round.
After the 1994 CECAFA Cup, Djibouti did not play a match until the qualification campaign for the 1998 African Cup of Nations in Burkina Faso. They were drawn in a two-legged qualifier against Kenya, and lost the first leg 3-0 away on 31 July 1998. The second leg at home was lost 9-1 on 15 August and Kenya went through 12-1 on aggregate.
In July 1999, Djibouti played in its second CECAFA Cup, in Rwanda. The team was drawn into a group against the host nation and Tanzania. It lost 4-1 to Rwanda on 24 July and 2-1 to Tanzania on 26 July, and did not advance to the next round.