Star Trek V: The Final Frontier is the first (and last) Star Trek film to be written by William Shatner. That's right—we're talking about Captain Kirk himself.
Shatner even came up with the initial idea. Inspired by popular televangelists of the time, he wrote an initial draft called An Act of Love that shares basic elements with the final film, such as the kidnapping of hostages on Nimbus III and the takeover of Enterprise. In his draft, however, Sybok is known as Zar, and in the film's conclusion, God is revealed to be the straight-up devil. Creepy.
Armed with this basic premise, Shatner fine-tuned the story with longtime Star Trek producer Harve Bennett before handing it off to David Loughery, a writer whose only previous credit was the script for the 1984 sci-fi film Dreamscape. Unfortunately for the filmmakers, the Writers Guild of America went on strike in 1988, which prevented Loughery from continuing work on the project.
There was some butting of heads after Loughery returned, though. For example, Shatner wasn't a fan of the way the guy changed Sybok's motivation from finding God to finding Sha Ka Ree, which in itself is a little inside joke—it's meant to sound like "Sean Connery" because producers initially wanted to cast the legendary Scotsman as Sybok.
Yeah, that's just bizarre.
In the end, however, the screenwriters managed to split the difference between these disparate visions of the film and unify their ideas in the final product. As much as they could, at least.