Castagne, 27, departs Leicester after three seasons at the King Power Stadium.
He has joined the Cottagers for an undisclosed fee until the summer of 2027, with an option to extend his deal by a further 12 months.
"It's been a long transfer window, but finally I'm here, and I'm happy to be here," Castagne told FFCtv.
"It's a big relief. I've talked to the manager and I just can't wait to start training and playing."
The Belgium international made 112 appearances for Leicester, scoring five goals, and featured 37 times in the Premier League last term as they suffered relegation from the Premier League.
Castagne has not played under new Leicester manager Enzo Maresca this campaign and returns to the top flight with Fulham.
Fulham's vice chairman Tony Khan said: "I'm excited to welcome Timothy Castagne to Fulham.
"He's a versatile and very talented defender with great experience in the Premier League and international competition for Belgium.
"I'm pleased that Timothy has committed to a four-year contract with us, and we believe that he'll be an excellent addition to Marco's squad."
Castagne could make his Premier League debut for Fulham in Saturday's trip to Manchester City.
Our coverage of Fulham is bigger and better than ever before - here's everything you need to know to make sure you never miss a moment