In many noise scenarios, ventilation is necessary. The practical realization of noise attenuation under the premise of ensuring ventilation is an urgent problem to be solved. In this paper, a ventilated acoustic metamaterial labyrinth (VAML) is proposed, and the corresponding analytical and numerical computational models are developed considering the thermal viscous effect (TVE). The loss in sound transmission of the VAML is quantitatively obtained and experimentally verified. The theoretical results are compared with the experimental results with an error of 0.6%. By comparing the transmission coefficient and the impedance at the entrance of the side branches, the mechanism of the TVE on the performance of VAML is analyzed, and it is clarified that the TVE is responsible for the sound absorption coefficient. The effects of structure parameters on the transmission coefficient of the VAML are analyzed individually. The results show that the resonant frequency of the system decreases as the length of channel 1 l1\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$l_1$$\\end{document}, the length of channel 2 l2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$l_2$$\\end{document}, and the width of channel d increase. By adjusting the magnitude of these three parameters, the control of the resonant frequency can be realized. Meanwhile, as l1\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$l_1$$\\end{document}, l2\\documentclass[12pt]{minimal} \\usepackage{amsmath} \\usepackage{wasysym} \\usepackage{amsfonts} \\usepackage{amssymb} \\usepackage{amsbsy} \\usepackage{mathrsfs} \\usepackage{upgreek} \\setlength{\\oddsidemargin}{-69pt} \\begin{document}$$l_2$$\\end{document} and ventilation radius R decrease the valley of transmission coefficient decreases which means better noise reduction. Finally, the effect of flow velocity on the transmission coefficient is analyzed, revealing the mechanism of fluid action on macroscopic acoustic properties.