Gossliwil is a former municipality in the district Bucheggberg, in the canton of Solothurn, Switzerland. On 1 January 2014 the former municipalities of Gossliwil, Tscheppach, Brügglen, Aetingen, Aetigkofen, Bibern, Hessigkofen, Mühledorf, Küttigkofen, Kyburg-Buchegg merged to form the new municipality of Buchegg.