In this paper we study the direct CP asymmetry of the doubly Cabibbo-suppressed decay mode $D^0 to K^+ pi^- $ within standard model and two Higgs doublet model with generic Yukawa structure. In the standard model we derive the corrections to the tree level amplitude, generated from the box and di-penguin diagrams, required for generating the weak CP violating phases. We show that these phases are so tiny leading to a direct CP asymmetry of order $10^{-9}$. Regarding the two Higgs doublet model with generic Yukawa structure we derive the Wilson coefficients relevant to $D^0 to K^+ pi^- $. After taking into account all constraints on the parameter space of the model we show that charged Higgs couplings to quarks can lead to a direct CP asymmetry of order $10^{-3}$ which is $6$ orders of magnitude larger than the standard model prediction.