NGC 6334 is a giant molecular cloud (GMC) complex that exhibits elongated filamentary structure and harbours numerous OB-stars, H II regions, and star-forming clumps. To study the emission morphology and velocity structure of the gas in the extended NGC 6334 region using high-resolution molecular line data, we made observations of the 12CO and 13CO $J=3 2$ lines with the LAsMA instrument at the APEX telescope . The LAsMA data provided a spatial resolution of 20" (sim 0.16 pc) and sensitivity of 0.4 K at a spectral resolution of 0.25 km $. Our observations revealed that gas in the extended NGC 6334 region exhibits connected velocity coherent structure over sim 80 pc parallel to the Galactic plane. The NGC 6334 complex has its main velocity component at $ -3.9$ km $ with two connected velocity structures at velocities $ -9.2$ km $ (the `bridge' features) and $ km $ (the northern filament, NGC 6334-NF). We observed local velocity fluctuations at smaller spatial scales along the filament that are likely tracing local density enhancement and infall, while the broader V-shaped velocity fluctuations observed towards the NGC 6334 central ridge and G352.1 region located in the eastern filament EF1 indicate globally collapsing gas onto the filament. We investigated the 13CO emission and velocity structure around 42 WISE H II regions located in the extended NGC 6334 region and found that most H II regions show signs of molecular gas dispersal from the centre (36 of 42) and intensity enhancement at their outer radii (34 of 42). Furthermore most H II regions (26 of 42) are associated with least one ATLASGAL clump within or just outside of their radii, the formation of which may have been triggered by H II bubble expansion. Typically towards larger H II regions we found visually clear signatures of bubble shells emanating from the filamentary structure. Overall the NGC 6334 filamentary complex exhibits sequential star formation from west to east. Located in the west, the GM-24 region exhibits bubbles within bubbles and is at a relatively evolved stage of star formation. The NGC 6334 central ridge is undergoing global gas infall and exhibits two gas bridge features possibly connected to the cloud-cloud collision scenario of the NGC 6334-NF and the NGC 6334 main gas component. The relatively quiescent eastern filament (EF1 - G352.1) is a hub-filament in formation, which shows the kinematic signature of global gas infall onto the filament. Our observations highlight the important role of H II regions in shaping the molecular gas emission and velocity structure as well as the overall evolution of the molecular filaments in the NGC 6334 complex.