The Westmorland and Lonsdale MP said he has decided to quit in the face of continuing questions over his faith.
In a speech to staff at the party’s London headquarters, Mr Farron said: “The consequences of the focus on my faith is that I have found myself torn between living as a faithful Christian and serving as a political leader.
“A better, wiser person than me may have been able to deal with this more successfully, to have remained faithful to Christ while leading a political party in the current environment.
“To be a political leader – especially of a progressive, liberal party in 2017 – and to live as a committed Christian, to hold faithfully to the Bible’s teaching, has felt impossible for me.”
The shock announcement came just hours after the party’s openly gay home affairs spokesman Lord Paddick announced he was quitting, citing “concerns about the leader’s views on various issues”.
Reacting to Mr Farron’s decision, Lord Paddick told Sky News: “I’m very sad for Tim Farron. I had a long conversation with Tim yesterday and we have a lot of respect for each other.”
Mr Farron, an evangelical Christian who has served as Lib Dem leader since 2015, was criticised during the General Election campaign for failing to answer questions about his views on homosexuality.
He made clear he supported equal marriage and LGBT rights, but in an interview did not say whether or not he thought it was a sin.
After days of pressure to clarify his stance, Mr Farron finally made clear he did not believe gay sex is a sin, but he continued to face questions in interviews.
In his speech on Wednesday, Mr Farron said the continued questions over his faith showed “we are kidding ourselves” if people thought Britain was a “tolerant, liberal society”.
He added: “I’m a liberal to my finger tips, and that liberalism means that I am passionate about defending the rights and liberties of people who believe different things to me.
“There are Christians in politics who take the view that they should impose the tenets of faith on society, but I have not taken that approach because I disagree with it – it’s not liberal and it is counterproductive when it comes to advancing the gospel.
“Even so, I seem to be the subject of suspicion because of what I believe and who my faith is in.”
The Liberal Democrats won an extra four MPs at this month’s General Election from their 2015 result, boosting their total to 12.
But the party failed to return nearer to their 2010 level of 57 seats, despite hoping to attract the support of pro-Remain voters.
Former business secretary Sir Vince Cable and his fellow coalition minister Jo Swinson, who both returned to the House of Commons this month, are among the favourites to replace Mr Farron as party leader.
Mr Farron will continue to serve as Lib Dem head until Parliament’s summer recess, when a party leadership election will be held.
Commenting on Mr Farron’s decision, his predecessor and ex-deputy prime minister Nick Clegg said: “This must have been an agonising decision given Tim’s lifelong dedication to the Liberal Democrats.
“I’m not a man of faith, but I’m sure I was not alone in being moved by the way Tim spoke about the struggle he found in balancing his faith and his politics.
“Tim grew the party at a crucial time and he will always be rightly remembered for that.”