A method for preparing citalopram of general formula (I), wherein the compound of general formula (II), wherein Z is iodo, bromo, chloro or CF3-(CF2)n-SO2-O-, wherein n is 0, 1, 2, 3, 4, 5, 6, 7 or 8, a cyanide exchange reaction occurs. In the reaction, the group Z realizes the exchange with cyanide by reacting with the cyanide source; the crude citalopram produced The product is optionally subjected to some preliminary purification, and the crude citalopram base is then subjected to a liquid membrane distillation process; the citalopram product obtained is then optionally further purified, then worked up and converted to the base or a pharmaceutically acceptable salt thereof. seperate.