Stranger than Fiction (2006 movie)
The main plot follows Harold Crick (portrayed by Ferrell), an IRS worker who begins hearing a disembodied voice narrating his life as it happens – seemingly the text of a novel in which it is stated that he will soon die – and he frantically seeks to somehow prevent that ending.