Open hemorrhoidectomy is one of the standard procedures for grade IV hemorrhoids. Postsurgical pain is a common problem for patients. We aim to prospectively evaluate potential factors affecting postoperative pain among hemorrhoidectomy patients. An observational study was conducted on 360 patients who had undergone Milligan-Morgan open hemorrhoidectomy. Details of the surgery and baseline information were recorded. Preoperative anxiety and depression were analyzed via the self-rating anxiety scale 20 (SAS-20) and self-rating depression scales 20 (SDS-20), respectively. Postoperative pain score was performed daily after surgery until the patient was discharged. The numerical pain score was evaluated by the visual analogue scale (VAS). The association between preoperative psychological states (anxiety or depression) and postoperative pain was analyzed using a generalized additive mixed model. A total of 340 patients eventually provided complete data and were included in our study. The average age was 43.3 ± 14.4 years, and 62.1% of patients were women. In total, 14.9% of patients had presurgical anxiety and 47.1% had presurgical depression. Postsurgical pain reached a peak point 1-2 days after surgery and went down to a very low level around 4-5 days after surgery. More excision of hemorrhoids could lead to more pain experience after surgery. Presurgical depression was associated with postsurgical pain. Patients who had presurgical depression had higher pain scores after surgery (2.3 ± 1.9 vs. 3.3 ± 1.9, p = 0.025). Preoperative depression and the amount of excisional hemorrhoids are positively related to postsurgical pain.