KRAS (v-Ki-ras2 Kirsten rat sarcoma viral oncogene homolog) is an oncogenic driver with mutations in 30% of non-small cell lung cancer (NSCLC). However, there is no effective clinical drug even though it has been identified as an oncogene for 30 years. In this study, we identified a small molecule inhibitor compound 0375-0604 targeting KRAS by using molecular docking based virtual screening approach. Compound 0375-0604 had a good binding affinity to KRAS in vitro and exhibited cytotoxicity in oncogenic KRAS expressing NSCLC cell lines. Further mechanism study showed that compound 0375-0604 can block the formation of the complex of guanosine triphosphate (GTP) and KRAS in vitro. In addition, compound 0375-0604 inhibited KRAS downstream signaling pathway RAF/MEK/ERK and RAF/PI3K/AKT. Finally, we also found that this compound can inhibit the cell growth through G2/M cell cycle arrest and induce apoptosis on the NSCLC cell lines harboring KRAS mutation. Therefore, compound 0375-0604 may be considered as a potential KRAS inhibitor for treatment of NSCLC carrying KRAS oncogene.