Accurate prediction of shale gas well production and estimated ultimate recovery (EUR) is always a difficult and hot spot in shale gas development. In particular, the production and EUR prediction of shale gas wells in new production blocks are faced with the lack of field gas well data and the difficulty of model development. In view of the above problems, this study proposes a new deep transfer learning strategy, which uses transfer component analysis (TCA) and deep neural network (DNN) to achieve shale gas well production and EUR prediction across formations/blocks. The feature extractor based on TCA can narrow the input feature distribution of the source and the target domains. The neural network model can be used to establish a domainadaptive transfer learning model without the prediction performance degradation caused by distribution offset. Validity and accuracy of the model were analyzed using gas well data from Weiyuan and Luzhou blocks in Sichuan Basin, China. The results appear that the reasonable application of TCA can greatly improve the prediction performance of shale gas well transfer learning model. For data sets of the same size, compared with the transfer learning model developed by classical machine learning algorithms, the proposed neural network-based transfer learning model can significantly improve the accuracy of production prediction across formations/ blocks. In addition, the proposed model can also be extended to other types of oil and gas production prediction tasks cross formations/blocks.