Days after filming was completed, Shatner returned to Paramount to supervise the film's edit, soundscape creation and score, and integration of optical effects. Editor Peter E. Berger had already assembled rough cuts of various sequences,and with only weeks before the film's scheduled completion, the production team set about the task of salvaging the film's ending through editing. The false god's screen time was reduced, and Ferren's "god blob" effect was replaced with a closeup of the actor's face, along with shots of lightning and smoke. At the time, Shatner felt that the edits "pulled a rabbit out of a hat", solving many of the film's problems.
Shatner's cut ran slightly over two hours (not including end credits or the opticals), which Paramount thought was too long. Their target runtime was one hour forty-five minutes, which would guarantee twice-nightly theatrical screenings. Bennett was handed the task of shortening the film's running time, despite Shatner's view that nothing could possibly be removed. Shatner was horrified by Bennett's edit, and the two haggled over what parts to restore or cut.
In early test screenings, the film received negative reviews. Of the first test audience, only a small portion considered the film "excellent", a rating that most other Star Trek films had enjoyed. Segments of the film were re-edited for the theatrical release. Five minutes of footage was excised to improve the film's pacing, and an additional scene was included on the Bird-of-Prey to make the circumstances of Kirk's rescue clearer. The second screening, with the final effects and sound in place, received much better reviews.