This paper addresses the problem of maritime vessel identification by exploiting the state-of-the-art techniques of distance metric learning and deep convolutional neural networks since vessels are the key constituents of marine surveillance. In order to increase the performance of visual vessel identification, we propose a joint learning framework which considers a classification and a distance metric learning cost function. The proposed method utilizes the quadruplet samples from a diverse image dataset to learn the ranking of the distances for hierarchical levels of labeling. The proposed method performs favorably well for vessel identification task against the conventional use of neuron activations towards the final layers of the classification networks. The proposed method achieves 60 percent vessel identification accuracy for 3965 different vessels without sacrificing vessel type classification accuracy.