The show, starring Benedict Cumberbatch, pulled in an average audience of 9.2 million with 9.7m tuning in at the peak.
That puts it just behind the Christmas Day episode of Mrs Brown's Boys, which pulled in an average audience of 9.4m, making it the most watched show of the festive season.
Co-creator Steven Moffat said: "Thrilling news on overnight ratings for Sherlock. A tribute to the team who work so hard, and with such pride, on the show, and of course to the genius of Sir Arthur Conan Doyle. It's proof that audiences will show up if you give them what they want - though we can't throw Benedict off a roof every week."