A paper in Science magazine in November 2003 showed that rainfall in the Niger region is driven by temperatures in the nearby south Atlantic and Indian oceans.
The paper looked at data from 1930 to 2000 and discovered a strong correlation between the strength of the African summer monsoon and the temperature in the Atlantic and Indian oceans. When these tropical oceans are unusually warm, you get dryness in the Niger region.
There is a plausible mechanism for this based on the geography of monsoons. The force of a monsoon is driven by the continental land mass being hotter than the surrounding oceans.
The greater the temperature difference, the stronger the monsoon. If oceans gets warmer, the difference shrinks, so the monsoon becomes weaker.
The south Atlantic and Indian oceans have been getting steadily warmer in recent decades. I believe it is likely that this is driven by the greenhouse effect, and that’s a common view among climate scientists.
In climate science we find that it’s impossible to say there’s a definite cause for, or effect of, any given event. What we do is talk about risk, the probability of a process. So we can say that global warming makes unusually warm conditions in the tropical Atlantic and Indian oceans more likely, which in turn increases the risk of a drought in the Niger region.
Moreover, Niger is at the northernmost limit of the monsoon area in Africa. That means it becomes extremely vulnerable to climatic changes even at the best of times. It was hit by a severe famine in the late 1970s and early 1980s.
The current Niger famine has been fuelled by rainfall dropping off. But locusts have played a part as well, as have economic factors.