Certain aspects of the invention relates to small molecule autophagy inhibitors of the formula (I), and their use for treatment and prevention of cancers and acute pancreatitis. As disclosed herein, a small molecule inhibitor of autophagy was been identified from an image-based screen in a known bioactive library. It was found that this autophagy inhibitor functions by promoting the degradation of type III PI3 kinase complex which is required for initiating autophagy. Medicinal chemistry studies led to small molecular autophagy inhibitors with improved potency and selectivity. (I)