Classical UNet with an encoder and decoder structure and its variants perform very well in the field of medical image segmentation. They have a key similarity of a skip-connection, which combines deep, semantic, and coarse-grained feature maps from the decoder subnetwork with shallow, low-level, and fine-grained feature maps from the encoder subnetwork. We noted that, in many cases in medical image segmentation, the boundary of the segmentation target is fuzzy and complex. Traditional UNet cannot accurately segment these details. The main purpose is to solve the fuzzy boundary problem in medical image segmentation. To solve this problem, we combine the advantages of previous models and improve them and propose a new dense edge attention U-type network (DEA-UNet) for medical image segmentation. Starting from the traditional UNet, we modified the concat and skip-connection operations in the latter part. We designed an edge guidance module that fused the features of all layers. Starting from the upsample at the deepest layer, the reverse attention module was used step by step to extract features from high to low, and the edge guidance module was combined with it, so each layer could fully extract boundary details that were difficult to be noticed by previous models, thus solving the problem of the fuzzy boundary of the lesion region. We conducted experiments on two kinds of medical datasets (chest CT and colonoscopic polyp) and compared them with the traditional network. The experimental results showed that our DEA-UNet performed better in multiple indicators. In the segmentation of coronavirus disease-19 images, the results indicate that DEA-UNet has a Dice of 74.6%, sensitivity (Sen) of 70.8%, specificity (Spe) of 96.7%, structural measure (Sα) of 0.766%, enhanced-alignment measure (Eϕ) of 0.910%, and mean absolute error (MAE) of 0.062%. Our DEA-UNET is 31%, 16%, 3%, and 0.7 and higher than the traditional medical segmentation model UNet, UNet++, the last model Few-shot UNet, and Inf-Net in Dice. In the segmentation of colonoscopic polyp dataset Kvasir, the results indicate that DEA-UNet has a Dice of 95%, structural measure (Sα) of 0.953%, enhanced-alignment measure (Eϕ) of 0.974%, and MAE of 0.015%. Our DEA-UNet is 13%, 13%, 23%, and 5% higher than the traditional medical segmentation model UNet, UNet++, the last model SFA, and PraNet in Dice. In other evaluation metrics, our DEA-UNet also performed better. When designing DEA-UNet, we also consider the balance between model size and prediction accuracy. Experiments show that, by proper pruning, we can greatly reduce the number of model parameters while maintaining the accuracy of prediction results with little change. This proves that our DEA-UNET has great potential in the field of medical image segmentation.