The club did not disclose a transfer fee but British media estimated he cost about 30 million pounds ($46.62 million).
"I'm very happy to be here. It has been a dream of mine to come and play here," Willian, who has played twice for Brazil, told the club's official website.
"Chelsea are one of the best clubs in the world, and now I'm going to play for one of the best managers in the world (Jose Mourinho), so I'm very happy and looking forward to it."
Willian, who can play as an attacking midfielder or winger, joined Anzhi from Ukraine's Shakhtar Donetsk in January, where he scored 20 goals in 140 league appearances.
Anzhi owner Suleiman Kerimov has reportedly put his entire first team up for sale, having sacked coach Rene Meulensteen.
Willian joins Germany forward Andre Schurrle, Dutch midfielder Marco van Ginkel and Australia goalkeeper Mark Schwarzer as recent arrivals at Stamford Bridge.
He is the latest addition to a long list of attacking midfielders at the club which includes Juan Mata, Frank Lampard, Oscar, Eden Hazard, Victor Moses, Kevin De Bruyne and Schurrle.
(Reporting by Josh Reich; editing by Ken Ferris)
