Forester was born in Cairo and, after a family breakup at an early age, moved with his mother to London, where he was educated at Alleyn's School and Dulwich College, south London. He began to study Medicine at Guy's Hospital, London, but left without completing his degree. Forester had always worn glasses and been of slender physique. Trying to enlist in the army, he failed his physical and was told there was not a chance that he would be accepted, even though he was of good height and somewhat athletic. Around 1921, after leaving Guy's, he began writing seriously using his pen name.
He married Kathleen Belcher in 1926 and they had two sons, John and George Forester. The couple divorced in 1945. In 1947, he married Dorothy Foster. John Forester wrote a two-volume biography of his father, including many elements of Forester's life which only became clear to his son after his death.
Forester's other novels include The African Queen (1935) and The General (1936); Peninsular War novels in Death to the French (published in the United States as Rifleman Dodd) and The Gun (filmed as The Pride and the Passion in 1957); and seafaring stories that did not involve Hornblower, such as Brown on Resolution (1929), The Captain from Connecticut (1941), The Ship (1943), and Hunting the Bismarck (1959), which was used as the basis of the screenplay for the film Sink the Bismarck! (1960). Several of his works were filmed, including The African Queen (1951), directed by John Huston. Forester is also credited as story Writer for several movies not based on his published fiction, including Commandos Strike at Dawn (1942).
Forester wrote many novels. He is best known for the 12-book Horatio Hornblower series, depicting a Royal Navy officer during the Napoleonic wars. He began the series with Hornblower fairly high in rank in the first novel, published in 1937. The last completed novel was published in 1962. With demand for more stories, Forester filled in Hornblower's life story, in effect. Hornblower's fictional feats were based on real events, but Forester wrote the body of the works carefully to avoid entanglements with real world history, so that Hornblower is always off on another mission when a great naval victory occurs during the Napoleonic Wars.
During the Second World War, Forester moved to the United States, where he worked for the British Ministry of Information and wrote propaganda to encourage the US to join the Allies. He eventually settled in Berkeley, California. While living in Washington, D.C., he met a young British intelligence officer named Roald Dahl in early 1942, whose experiences in the RAF he had heard about, and encouraged him to write about them. According to Dahl's autobiographical Lucky Break, Forester asked Dahl about his experiences as a fighter pilot. This prompted Dahl to write his first story, "A Piece of Cake".
He wrote several volumes of short stories set during the Second World War. Those in The Nightmare (1954) were based on events in Nazi Germany, ending at the Nuremberg Trials. Stories in The Man in the Yellow Raft (1969) followed the career of the destroyer USS Boon, while many of those in Gold from Crete (1971) followed the destroyer HMS Apache. The last of the stories in Gold from Crete was "If Hitler had invaded England", which offers an imagined sequence of events starting with Hitler's attempt to implement Operation Sea Lion, and culminating in the early military defeat of Nazi Germany in the summer of 1941. His non-fiction seafaring works include The Age of Fighting Sail (1956), an account of the sea battles between Great Britain and the United States in the War of 1812.
C. S. Forester appeared as a contestant on the TV quiz program You Bet Your Life, hosted by Groucho Marx, in an episode broadcast on 1 November 1956.
A "lost" novel of Forester's, The Pursued, was discovered in 2003 and bought at an auction and was published by Penguin Classics on 3 November 2011.