Kennedy was elected to the House of Representatives in 1946, 1948, and 1950 for the state of Massachusetts. In 1952 and 1958, he was elected a senator from Massachusetts, and served in the Senate until resigning after he was elected president in 1960. It was a passage from Herbert Agar's book The Price of Union about an act of courage by an earlier senator from Massachusetts, John Quincy Adams, that gave Kennedy the idea of writing about senatorial courage. He showed the passage to Sorensen and asked him to see if he could find some more examples. This Sorensen did, and eventually they had enough not just for an article, as Kennedy had originally envisaged, but a book. With help from research assistants and the Library of Congress, Kennedy wrote the book while bedridden during 1954 and 1955, recovering from back surgery.
Interaction between the White House and broadcast television was expanded considerably by the Kennedy administration. The television adaptation of his book Profiles in Courage is a significant example of Kennedy's noted use of television to promote himself and his political positions as part of what was called the New Frontier.