This paper proposes the spacecraft attitude control algorithm based on Convolutional Neural Networks (CNNs) for spacecraft's docking port alignment. the CNN model is used in order to recognize the attitude of target spacecraft and the attitude controller aligns the docking port of the target spacecraft using the target spacecraft's attitude information obtained from CNN. Three-Dimensional spacecraft simulator is developed for training CNN model and testing the algorithm. Experiments are conducted for demonstrating the target spacecraft's attitude recognition and attitude control performances of the proposed algorithm.