The present invention discloses a compound of formula (I) and citrate thereof as type 5 phosphodiesterase inhibitor, a preparation method thereof, and a pharmaceutical composition including the compound of formula (I) and citrate thereof. The experimental results of the present invention prove that the compound of formula (I) and citrate thereof can inhibit activity of type 5 phosphodiesterase, and can be used for treating erectile dysfunction, inhibiting platelet aggregation and treating thrombosis, decreasing pulmonary hypertension and treating cardiovascular diseases, treating asthma and treating diabetes gastroparesis.