The pair will play a married couple, Ian and Emma, who are negotiating the fears, comforts and frustrations of their 30-year marriage.
Bafta-winning writer Stefan Golaszewski has created the new four-part series, titled Marriage, which will be available on BBC One and iPlayer.
Walker is known for her previous role as Ruth Evershed in spy drama Spooks and played DCI Cassie Stuart in Unforgotten until 2021.
She also won the Olivier Award for best supporting actress in 2013 for the play The Curious Incident Of The Dog In The Night-Time.
Discussing the new role, Walker said: “This is a unique project. Stefan has created such a beautiful, funny and complicated world and I’m excited to be stepping into Ian and Emma’s marriage with Sean.”
Sean Bean, who was recently praised for his role in BBC's Time, said: “I’m thrilled to be playing opposite the talented Nicola Walker and I’m looking forward to bringing Stefan’s intimate scripts to the screen.”
He previously featured in Game Of Thrones and played Boromir in The Lord Of The Rings series and recently starred in the BBC’s prison drama Time, playing the newly imprisoned Mark Cobden.
Golaszewski said: “It’s amazing to get to work with Sean and Nicola.
“They’re actors of such depth, truth and warmth and I can’t wait to go on this journey with them.”
Golaszewski previously created the hit sitcom Him & Her, starring Russell Tovey and Sarah Solemani, which won him the Bafta Award for best situation comedy in 2014.
He also created the popular BBC sitcom Mum, centred around a recently widowed, suburban 59-year-old woman named Cathy, played by Lesley Manville.
Piers Wenger, director of BBC drama commissioning, said: “The extraordinary depth and complexity of Stefan’s characters calls for two of our most talented and loved actors.
“Enter Nicola and Sean. It’s always a privilege to have you on the BBC.”