The invention provides a method of preparation of empagliflozin in amorphous form by spray drying. The thus prepared empagliflozin is in the form of particles with pharmaceutically acceptable polymer, and can be used in the treatment or prevention of type 2 diabetes. The invention further encompasses a pharmaceutical composition cotnaining empagliflozin prepared by the spray-drying method.