Nigerian government officials said Mohammed Yusuf, 39, was shot while trying to escape. His capture by police had been announced just hours earlier.
His group is blamed for days of unrest that has left hundreds of people dead. The Boko Haram group wants to overthrow the Nigerian government and impose a strict version of Islamic law.
Mr Yusuf was held and later shot in the north-eastern city of Maiduguri. Human rights campaigners have voiced concern over the death of the leader of an Islamic sect in Nigerian police custody, calling it “unlawful” killing.
Bilkisu Babangida in Maiduguri, a Nigerian journalist says that “at about 4pm I was about to leave for home with the rest of the journalists. We received a phone call to return back to the government house because the man, Mohammed Yusuf had been captured.
So we rushed up to that place. We heard some gunshots from somewhere, and then we were told that the man had been “executed” at the police headquarters, at about 7pm.
I saw a video and after that I rushed to the police headquarters and I saw the corpse. I even photographed the corpse of Mohammed Yusuf.
Earlier journalists were shown two films, one apparently showing Mr Yusuf making a confession; the other showing what appeared to be his body, riddled with bullets.
“Mohammed Yusuf was killed by security forces in a shootout while trying to escape,” the regional police assistant inspector-general, Moses Anegbode, told Nigerian television.
A spokesman for the state governor was also quoted as saying that Mr Yusuf had been trying to escape.
One policeman told AFP news agency Mr Yusuf had “pleaded for mercy and forgiveness before he was shot.”
Troops had stormed the stronghold of Boko Haram – sometimes referred to as Taliban – on Wednesday night, killing many of the militants and forcing others to flee.
Mr Yusuf was arrested on Thursday after reportedly being found hiding in a goat pen at his parents-in-law’s house.
Staff at Human Rights Watch said there should be an immediate investigation into the case.
“The extrajudicial killing of Mr Yusuf in police custody is a shocking example of the brazen contempt by the Nigerian police for the rule of law,” said Human Rights Watch’s Eric Guttschuss. Yusuf’s death also deprives intelligence agencies of the opportunity to question him about possible links to other militant groups outside Nigeria.
Another Human Rights Watch researcher, Corinne Dufka, told AP news agency: “The Nigerian authorities must act immediately to investigate and hold to account all those responsible for this unlawful killing and any others associated with the recent violence in northern Nigeria.”
The violence began on Sunday night in Bauchi state, before spreading to other towns and cities in the northeast of the West African nation.
Crowds of militants tried to storm government buildings and the city’s police headquarters, but dozens of them were shot dead by security forces.
Several days of gun battles between militants and Nigerian security forces ensued, culminating in the assault on the militant’s stronghold.
It is thought more than 300 people have died in the violence – some estimates say 600, although there has been no official confirmation.
The Red Cross said about 3,500 people had fled the fighting and were being housed in their camp.
Witnesses and human rights groups have accused the military of excessive violence in quelling the militants, but the army says it used a minimal amount of force.
Around a dozen soldiers, police officers and prison officials are among the hundreds killed in the unrest, while the remainder of the dead largely consist of suspected Boko Haram followers, according to police.
National defense spokesman Colonel Mohammed Yerima said there would be a military “show of force” on Friday to reassure civilians that they would be protected.