Nottwil is a municipality in the district of Sursee in the canton of Lucerne in Switzerland. Nottwil is first mentioned around 1217-22 as Nottewile. In 1275 it was mentioned as Otewile. The municipality is located on the southern shore of Lake Sempach (Sempachersee). It consists of the village of Nottwil and the scattered settlements of Eggerswil, Ei, Gattwil, Huprachtigen, Tann and Studen as well as Schloss Tannenfels.