A presidential spokesman said the dialogue was through “backroom channels”, without elaborating further.
The group’s main faction earlier this week ruled out peace talks.
Boko Haram, which wants to create an Islamic state, is accused of killing hundreds of people and targeting churches and other targets.
“The form of the dialogue is that backroom channels are being used to reach across with the sole objective of understanding what exactly the grievances of these persons are, what exactly can be done to resolve the crises,” presidential spokesman Reuben Abati said.
He said this was being done “in the overall best interest of ensuring peace and stability in Nigeria and the security of life and property”.
The spokesman added that the talks were going on with at least some members. Boko Haram, whose name means Western education is forbidden, is known to have several factions.
This is the first official government confirmation of dialogue with the militant group, the BBC’s Nigeria correspondent Tomi Oladipo reports.
An earlier attempt at peace talks collapsed very quickly.
The group has so far made no public comments over the latest revelation of the ongoing attempts towards negotiations, our correspondent says.
Nigeria is roughly divided between a mainly Muslim north and predominately Christian and animist south.
Boko Haram has staged most of its attacks in northern areas, but has also carried out some in the capital, Abuja and the volatile central city of Jos, where tension is high between rival Muslim and Christian communities.