Lady Hale, who presided over the momentous decision to rule Boris Johnson’s prorogation of parliament unlawful, is set to write her memoirs, of how “a little girl from a little school in a little village in North Yorkshire became the most senior judge in the United Kingdom”.

The supreme court’s first female president, who retired this year after capturing public attention with her steely handling of the prorogation case and her eye-catching array of brooches, has signed a deal with Penguin Random House imprint the Bodley Head for two books: a memoir, which will be published next year, and an exploration of the importance of the law, from why we need it to why it sometimes fails, illustrated using landmark judgments.

Hale said of the memoir, to published in 2021: “Mine is not a rags to riches story – either at the beginning or at the end.” Instead, she said, it was the story of how that little girl from North Yorkshire “found that she could cope. And it shows how other women and people from similarly small beginnings, without any connections or obvious advantages in the law, will find that they can cope too.”

She said her second book would explore how the law was “there for government … no one at all is above the law”.

She added that it would explain how the law “touches all our lives – every time we buy something, take a ride on a train or a bus, go out for a drive or to ride our bikes, go to school or to work, start a business, move in with a partner, get married or have children, go to hospital and eventually die – the law is with us from cradle to grave”.

“It should be there for everyone – and not just for individuals and enterprises,” she said. “We all need to know where we stand and never more so than in extraordinary times like these.”

Stuart Williams, who acquired the two books for the Bodley Head, said Brenda Hale had been “an inspirational figure to many people for years – for her achievements in the law, for the causes she has championed, and for her passionate views on access to the law as a profession”.

“Of course, her historic and dramatic role in determining that parliament had not been prorogued gave her an even greater national prominence,” said Williams. “I expect her books to be direct, warm, arresting and candid, and to introduce readers to a great mind and a great campaigner.”

Equal to Everything, a children’s book about her life, written by the Guardian columnist and former barrister Afua Hirsch, was published last year.