Marine controlled-source electromagnetic (MCSEM) inversion plays a crucial role in hydrocarbon exploration and pre-drill reservoir evaluation. Deep learning techniques have been widely used in geophysical inversions. Although they work on theoretical data well, their performance on survey data needs to be improved. Since no constraint of physical laws is applied in the training phase, the trained neural network often exhibits large errors when extended to new datasets with different distributions from the train set. To solve this problem, we add a differentiable marine EM forward operator at the end of the neural network that maps the network-predicted results back to the response data. We incorporate a data error term to the loss function and the gradient of data error with respect to model parameters in the gradient back-propagation process so that we can successfully introduce the physical law constraints into the network training process. Experiments on synthetic data validate the effectiveness of our Physics-driven Deep Neural Network (PhyDNN) inversions. It performs significantly better than the conventional DNN as it can recover the model accurately while maintaining data fitting. Tests on theoretical data with different noise levels further demonstrate the superiority of our PhyDNN, which can achieve stable inversions under high noise levels. Moreover, we use the t-distributed stochastic neighbor embedding (t-SNE) algorithm to analyze the similarity between the train sets and real data. The results show that the real data falls within the data distribution of the train sets, ensuring the credibility of the inversion results. Finally, we use PhyDNN to invert an EM survey dataset acquired over a deep-sea sedimentary basin. The inversion results match well Occam's inversions, indicating that our physics-driven network has enhanced the data adaptability and overcome the limitation of conventional DNN in handling new data.