Skin cancer is a pressing global health issue, with high incidence and mortality rates. Convolutional neural network (CNN) models have been proven to be effective in improving performance in skin lesion image classification and reducing the medical burden. However, the inherent class imbalance in training data caused by the difficulty of collecting dermoscopy images leads to categorical overfitting, which still limits the effectiveness of these data-driven models in recognizing few-shot categories. To address this challenge, we propose a dynamic multi-output convolutional neural network (DMO-CNN) model that incorporates exit nodes into the standard CNN structure and includes feature refinement layers (FRLs) and an adaptive output scheduling (AOS) module. This model improves feature representation ability through multi-scale sub-feature maps and reduces the inter-layer dependencies during backpropagation. The FRLs ensure efficient and low-loss down-sampling, while the AOS module utilizes a trainable layer selection mechanism to refocus the model's attention on few-shot lesion categories. Additionally, a novel correction factor loss is introduced to supervise and promote AOS convergence. Our evaluation of the DMO-CNN model on the HAM10000 dataset demonstrates its effectiveness in multi-class skin lesion classification and its superior performance in recognizing few-shot categories. Despite utilizing a very simple VGG structure as the sole backbone structure, DMO-CNN achieved impressive performance of 0.885 in BACC and 0.983 in weighted AUC. These results are comparable to those of the ensemble model that won the ISIC 2018 challenge, highlighting the strong potential of DMO-CNN in dealing with few-shot skin lesion data.