The last published story was 'The Adventure of Shoscombe Old Place' (1927).
The last case of Sherlock Holmes' career was 'His Last Bow' (1917).
Some people even say his last case was 'The Final Problem' (1893).
Of course, there have been hundreds (if not thousands) of imitations since then.
The Adventure of Shoscombe Old Place can be found in 'The Casebook of Sherlock Holmes.'