O'Brien was born in Brookline, Massachusetts. His father, Thomas Francis O'Brien, is a physician, epidemiologist, and professor of medicine at Harvard. His mother, Ruth O'Brien (née Reardon), is an attorney and partner at the Boston firm Ropes & Gray. He is the third of six children. O'Brien's family is Irish Catholic; some of his Irish ancestors immigrated before the American Civil War. In a "Late Night" episode, O'Brien paid a visit to County Kerry, Ireland, where his ancestors originated.