The present invention discloses a series of piperidine derivatives as orexin receptor antagonists and compositions thereof, and relates to the application thereof in preparing medications for the treatment of insomnia, chronic obstructive pulmonary disease, obstructive sleep apnea, hypersomnia, anxiety, obsessive-compulsive disorder, panic attack, nicotine addiction, or binge eating disorder.