The song "Eleanor Rigby" was primarily written by Paul McCartney and is credited to the songwriting partnership Lennon-McCartney. While there has been some dispute from John Lennon about the extent of his contribution, eyewitness accounts and other sources largely support that McCartney was the main author of the song. Lennon claimed to have helped with some lyrics, but McCartney stated the contribution was about 80-20 in his favor. The song, released by The Beatles in 1966, is known for its narrative on loneliness and its innovative string arrangement.
There is also a novel titled "Eleanor Rigby" written by Douglas Coupland in 2004, but this is unrelated to the Beatles song authorship.