Respiratory syncytial virus (RSV) is the major cause of bronchiolitis and pneumonia in young children and the elderly. There are currently no approved RSV-specific therapeutic small molecules available. Using high-throughput antiviral screening, we identified an oral drug, the prenylation inhibitor lonafarnib, which showed potent inhibition of the RSV fusion process. Lonafarnib exhibited antiviral activity against both the RSV A and B genotypes and showed low cytotoxicity in HEp-2 and human primary bronchial epithelial cells (HBEC). Time-of-addition and pseudovirus assays demonstrated that lonafarnib inhibits RSV entry, but has farnesyltransferase-independent antiviral efficacy. Cryo-electron microscopy revealed that lonafarnib binds to a triple-symmetric pocket within the central cavity of the RSV F metastable pre-fusion conformation. Mutants at the RSV F sites interacting with lonafarnib showed resistance to lonafarnib but remained fully sensitive to the neutralizing monoclonal antibody palivizumab. Furthermore, lonafarnib dose-dependently reduced the replication of RSV in BALB/c mice. Collectively, lonafarnib could be a potential fusion inhibitor for RSV infection.