A beta-lactamase inhibitor having a formula (I). Also provided is a method of using the beta-lactamase inhibitor for prevention or treatment of diseases.