The present invention relates to an inhibitor of cyclin-dependent kinase CDK9, having a structure of formula (I). The present invention also provides a method of treating a cancer of a precancerous condition related to CDK9 activity with the inhibitor and a use of the same.