Hajnal was born in Darmstadt, at the time the capital of the People's State of Hesse in Weimar Germany, to a Hungarian Jewish family. In 1936 his parents left Nazi Germany, and placed him in a Quaker school in the Dutch countryside while they arranged to settle in Britain. In 1937, John was reunited with his parents in London, where he attended University College School, Hampstead.
He met Berlin-born Nina Lande in New York. They were married from 1950 until her death in 2008 and had three daughters and a son.
Returning to the United Kingdom, he worked at Manchester University as a statistician from 1953. The family moved to London in 1956, when John was assured a lectureship at the London School of Economics. He was Professor of Statistics at the London School of Economics from 1975 until his retirement in 1986.
Hajnal is best known for identifying, in a landmark 1965 paper at LSE  the historical pattern of marriage of northwest Europe in which people married late and many adults remained single. The geographical boundary of this unusual marriage pattern is now known as the Hajnal line.
- Royal Commission on Population, 1944–48
- United Nations, New York, 1948–51
- Office of Population Research, Princeton University, 1951–53
- Manchester University, 1953–57
- London School of Economics, 1957–86. Reader, 1966–75, Professor of Statistics 1975-1986
- Visiting Fellow Commoner, Trinity College, Cambridge, 1974–75
- Visiting Professor, Rockefeller University, 1981
- "European Marriage Patterns in Perspective," in Glass and Eversley, eds., Population in History, Essays in Historical Demography, 1965
- Who's Who (2006)
- The Palgrave Dictionary of Anglo-Jewish History, ed. W. D. Rubinstein, Palgrave Macmillan, 2011, p. 387.
- Obituary, The Jewish Chronicle, 5 February 2009.