O'Shaughnessy’s role, which starts on 1 July, is to support the firm’s senior management team with the growth of the agency globally and in the UK.
He will work alongside senior advisers including former Freud’s chief executive Nicola Howson and Alastair Campbell.
He will not work on public affairs activity or health and lifestyle clients as per PRCA and ACOBA requirements.
O'Shaughnessy previously worked at Portland from 2012 to 2015 as its chief policy adviser.
In 2015, he was appointed to the House of Lords by David Cameron and served as parliamentary under secretary of state in the Department of Health and Social care between 2016 and 2018.
In the government, O'Shaughnessy led on initiatives including NHS Digital, the Life Science Industrial Strategy as well as preparing the health and care system for Brexit.
He also served as director of policy for Cameron between 20017 and 2011 and drafted the Conservative Party’s 2010 general election manifesto.
Portland UK managing director Mark Flanagan said the firm was pleased to welcome O'Shaughnessy back.
"The agency has grown significantly in the time he has been away with a broader range of capabilities and headcount as we continue to expand and refresh," Flanagn said.
O'Shaughnessy added: "It’s really exciting to be returning to Portland to advise companies at such a significant time in the UK and global politics. I am looking forward to working with Portland’s clients as they seek to analyse and understand the complexities of the current political environment."