Hannan was born on 1 September 1971 in Lima, Peru. His mother was a Scot who had been working in the British Embassy in Lima. His father, whose family origins are Ulster Catholic, had been educated in the UK and had served in Italy during the Second World War with the North Irish Horse of the British Army. Hannan grew up on his parents' farm outside Lima, attending school and university in Britain. He was educated at Winchester House School and Marlborough College.