In response to the need for brain tumor image segmentation, which involves segmenting it into three different regions based on the degree of tumor lesions, this paper addresses several issues with the Unet model, such as limited feature extraction accuracy and unclear region segmentation. To tackle these challenges, we propose a multi-scale aggregation Unet segmentation algorithm that incorporates an attention mechanism. The proposed algorithm follows a two-step process: first, it conducts feature extraction and up-sampling after each layer's down-sampling in the Unet architecture, and then iteratively aggregates the feature map with the up-sampled map. Second, we introduce residual blocks in the encoding stage to address the issue of gradient vanishing during downsampling. Finally, we incorporate channel attention mechanisms across layers in the decoding stage to direct the network's focus on the relevant regions, thus improving the segmentation accuracy of lesion regions. We conducted simulation experiments using the BraTs2021 training set, achieving Dice coefficients of 0.927, 0.861, and 0.867 for the segmentation of the whole tumor, core tumor, and enhanced tumor images, respectively. These results surpass those of most existing brain tumor segmentation models.