Current multifocus fusion algorithms use only a single-image feature extraction scale, leading to problems such as loss of detail edges and local blurring in imaging. In response to these algorithms, this paper proposes a multifocus image fusion algorithm based on multiscale null U-Net. First, in the encoder part of U-Net, a multiscale null module was introduced to replace the traditional convolution module, which fully uses sensory fields with various scales to capture local and global information more comprehensively. In addition, to enhance the image feature characterization further, a RFB-s module was employed in the middle layer of U-Net to optimize the localization ability of multiscale features. The proposed fusion algorithm adopted the end-to-end supervised learning method in deep learning. This method was divided into three modules: feature extraction, feature fusion, and image reconstruction. Among these, the feature extraction module used U-Net containing multiscale null modules. Experimental results show that the fused images obtained using the proposed algorithm have clear detailed texture and are free of overlapping artifacts. Among all multifocus image fusion algorithms used for comparison, the proposed algorithm is optimal in terms of average gradient, visual information fidelity, and mutual information evaluation metrics. Additionally, this algorithm achieves suboptimal results close to the optimal results in edge information retention metrics. Meanwhile, the ablation experiment results further verify that the proposed multiscale null module can remarkably enhance the feature extraction capability of the network, thereby improving the quality of image fusion.