Since the outbreak of Coronavirus disease 2019 (COVID‐19), it has been spreading rapidly worldwide and has not yet been effectively controlled. Many researchers are studying novel Coronavirus pneumonia from chest X‐ray images. In order to improve the detection accuracy, two modules sensitive to feature information, dual‐path multiscale feature fusion module and dense depthwise separable convolution module, are proposed. Based on these two modules, a lightweight convolutional neural network model, D2‐CovidNet, is designed to assist experts in diagnosing COVID‐19 by identifying chest X‐ray images. D2‐CovidNet is tested on two public data sets, and its classification accuracy, precision, sensitivity, specificity, and F1‐score are 94.56%, 95.14%, 94.02%, 96.61%, and 95.30%, respectively. Specifically, the precision, sensitivity, and specificity of the network for COVID‐19 are 98.97%, 94.12%, and 99.84%, respectively. D2‐CovidNet has fewer computation number and parameter number. Compared with other methods, D2‐CovidNet can help diagnose COVID‐19 more quickly and accurately.