Nigeria became independent from the United Kingdom on October 1, 1960, and shortly after the country plunged into a bloody civil war, with estimates for the number of dead being between 1 and 3 million. During the civil war, two secessionist states were created:
Thus, and strictly speaking, we can't say that Nigeria had stayed together for the whole of its history as an independent state.
The ethnic and religious tensions that lead to the civil war still fuel secessionist movements. The Movement for the Sovereign State of Biafra (MASSOB) advocates for the re-establishment of the Republic of Biafra or at least a new state for the Ogbi people. Its members have claimed that the Nigerian police and army harass and prosecute them regularly. In a recent news story, Chief Arinze Igbani has sued both the police and the army for violating his human rights. In another incident, the movement's leader, Ralph Uwazuruike, and 280 other members were reportedly detained, and released after a few days with the intervention of President Jonathan.
Another notable secessionist movement, the Movement for the Survival of Ogoni People (MOSOP) advocates for the creation of a state for the Ogoni people, north-east of the Niger Delta. The repression of the Ogoni people is described in some detail in the Human Rights Watch publication The Ogoni Crisis: A Case-Study of Military Repression in Southeastern Nigeria. MOSOP has declared "self-government" in August 2012.
A third source of secessionist tension is the Bakassi issue. Nigeria may have given up on its claims on the oil rich Bakassi peninsula in 2008, however the Efik people that traditionally inhabited the area plan to join forces with Southern Cameroon to form an independent nation.
Adding to these and various other smaller secessionist movements, sectarian conflict isn't rare either, with the Boko Haram being responsible for over 900 deaths (to date). While what held the country together during its era of military rule might be obvious, since 1999 and the country's first democratic elections it seems that ethnic and religious tensions are constantly growing and currently Nigeria is in a very fragile state. President Jonathan's election in 2011 was met with violence in the predominantly Muslim North, although the election process was hailed in the West.
I think the country is one of the worst examples of colonialism, the British had the terrible idea of packing traditionally warring factions into a single country. While researching the answer, I got the feeling that the only time the various ethnic groups of Nigeria had some kind of "national purpose" was when they were fighting the British and now that the British are gone they're back at fighting each other.
Simply put, it's a gigantic mess, and if tensions continue to rise, it's not unthinkable that the only solution would be for Nigeria to split into separate states. One factor that might contribute towards Nigeria remaining a single state is that memories of the civil war and the various military dictatorships that followed it are still fresh, but that won't last for long.