Ammonia's distinctive chemical makeup, coupled with its ability to combust fully without carbon emissions, position it as a promising carbon-free fuel but requires careful management to mitigate NOx emissions. In practice, supplementing ammonia with hydrogen addresses its slow combustion rate and high ignition energy requirements. Meanwhile, the introduction of a bluff body (BB) within the pipe can alter the way of flame propagation. This study examines the combustion dynamics of the premixed ammonia/hydrogen/air flame in a pipe with a variable cross-section. The experimental findings demonstrate that increasing both equivalence ratio (Φ) and hydrogen volume fraction (αH2) significantly alters the flame front velocity (FFV) and maximum overpressure (Pmax), while also enhancing the symmetry of the flame across variable cross-section. The addition of BB creates a vortex in the flame, the formation of which intensifies the combustion of the flame behind the BB, which can promote the generation of Helmholtz oscillations, elevate the amplitude of the pressure, improve FFV, and shorten the flame propagation time in the pipe. With the increase of Φ and αH2, the time is shortened less. When Φ = 0.8, αH2 = 40%, the flame propagation time was shortened by 709 ms. When Φ = 1.2, αH2 = 60%, the flame propagation time was shortened by 5.67 ms only. In addition, Pmax and maximum flame front velocity (FFVmax) are more sensitive to αH2 than Φ. After the addition of BB, the increase amplitude of Pmax and FFVmax is increased. However, when Φ = 1.0 and Φ = 1.2, the amplitude of FFVmax increase decreases with the increase of αH2. This study can provide some suggestions for the application of NH3/H2 fuels in variable cross-sections as well as under obstacles.