The opposition for the August 5 match is not yet known but is likely to be a leading African national team, the London club said on their website on Friday.
The friendly will be played at the 60,000-capacity Abuja National Stadium.
Arsenal, who are also planning pre-season games in China, Malaysia and Hong Kong, last visited Africa for a tour of South Africa in 1993.
The Islamist group Boko Haram has been fighting a low-level insurgency in Nigeria for more than two years.
Although its attacks are mostly in the north of Africa's most populous nation it has bombed several targets in the capital Abuja, located in the centre of the country.
The office of local newspaper This Day was hit on April 26 by a car bomb and last year United Nations headquarters and the office of the chief of police were struck by suicide bombers.
The sect, which wants to impose an Islamic state on Nigeria's evenly mixed population of Muslims and Christians, has been blamed for hundreds of killings since its uprising against the government in 2009.
Arsene Wenger accepts Arsenal had to make a "sporting compromise" with their pre-season summer tour to the Far East and Nigeria.
While Wenger admits it is not perhaps the best preparation for his squad, many of whom will have been at the European Championships, the Arsenal manager can understand the need for the change in philosophy.
Speaking at a press conference flanked by Arsenal's chief commercial officer Tom Fox and sponsor Emirates' divisional senior vice president corporate communications Boutros Boutros, Wenger said: "We have had to compromise on the sporting side, because we had a rational, methodical approach to our pre-season.
"We have sacrificed some of that to go on tour. But we are in a race with the other clubs as well. I realised when I was at the World Cup in South Africa how popular a club like Arsenal is in Africa, especially in Nigeria. It is unbelievable. I was even frightened at some stage by how popular Arsenal is. In Kenya as well, it is absolutely unbelievable."