Penile length shortening and erectile dysfunction are common complications after radical prostatectomy. Various methods have been used to maintain erectile function, but less attention has been paid to preserving penis length. N-acetylcysteine (NAC) has the effect of antioxidation and antifibrotic, which may be beneficial to improve those postoperative complications. This study investigated the effect of NAC on maintaining the penile length and the erectile function after bilateral cavernous nerve crush (BCNC) and its underlying mechanism. Twenty-four male rats were randomly divided into three groups: control group, BCNC group, and BCNC + NAC group. NAC or equal volume of saline was daily administrated by intragastric gavage for 4 weeks. The initial and end penile lengths were measured. Intracavernosal pressure/mean arterial pressure (ICP/MAP) ratio was calculated to assess erectile function. Hematoxylin–eosin staining, Masson's trichrome staining, immunohistochemistry, and Western blot were performed to explore cellular and molecular changes of the penis. Compared to the BCNC group, the penile length, ICP/MAP ratio and smooth muscle/collagen ratio in the BCNC + NAC group were improved significantly (all P < 0.05), and the expressions of endothelial nitric oxide synthase, α-smooth muscle actin, glutathione, and glutathione peroxidase 1 were significantly increased after NAC treated (all P < 0.05), along with the decreased expressions of hypoxia-inducible factor-1α, transforming growth factor-β1, collagen I, collagen III, collagen IV, malonaldehyde, and lysine oxidase (all P < 0.05). This study demonstrated that NAC could maintain penile length and partly improve erectile function. Possible mechanism is directly and/or indirectly related to antihypoxic and antifibrosis.