The autonomous generation of routes is an important part of ship intelligence and it can be realized by deep learning of the big data of automatic identification system (AIS) ship trajectories. In this study, to make the routes generated by long short-term memory (LSTM) artificial neural network more accurate and efficient, a ship route autonomous generation scheme is proposed based on AIS ship trajectory big data and improved multi-task LSTM artificial neural network. By introducing an unsupervised trajectory separation mechanism into LSTM, a fast and accurate separation of trajectories with similar paths is realized. In the process of route generation, first of all, a clustering algorithm is used to cluster the trajectories in massive AIS data according to the density of trajectory points, so as to eliminate the trajectories in the routes that do not belong to the target area. Furthermore, the routes are classified according to the type of ships, and then the classified trajectories are processed and used as datasets. Based on these datasets, an improved LSTM algorithm is used to generate ship routes autonomously. The results show the improved LSTM works better than LSTM when the generated route trajectories are short.