In this paper, a joint OSNR and nonlinear noise power estimation scheme based on multi-task deep neural network (MT-DNN) is proposed with the advantages of dispersion-insensitive, modulation-format-transparent for high-speed, long-haul, multi-channel fiber-optic communication systems. Amplitude histograms (AHs) are generated by processing the spectrums collected with different OSNR, launch power and transmission distance by an offline spectrum preprocessing flow. The MT-DNN can automatically learn the features of the AHs to achieve OSNR and nonlinear noise power estimation, simultaneously. For 4-quadrature amplitude modulation (4QAM), 16QAM and 64QAM signals under different transmission conditions, the average MAE and RMSE are calculated for the OSNR estimate and the nonlinear noise power estimate, which are both less than 1 dB. Moreover, the resistance of OSNR estimation to amplified spontaneous emission (ASE) noise and nonlinearity, and the tolerance of nonlinear noise estimation to launch power and transmission distance are investigated, respectively. The results demonstrate that the joint OSNR and nonlinear noise power estimation scheme is insensitive to dispersion, transparent to modulation format, and has high accuracy and high tolerance. This research provides a research reference value for future optical performance monitoring of coherent optical communication systems.