The invention discloses a die with an ejection needle on a sliding block. The die comprises a front die core, a back die core, a back die plate, a sliding block assembly, an oblique pin and an ejection needle assembly; the front end of the sliding block assembly is provided with a feeding port; the ejection needle assembly is inserted into the back die plate, the back die core and the sliding block assembly sequentially from bottom to top and makes contact with the feeding port arranged on the sliding block assembly in a matching mode, the ejection needle assembly can vertically slide relativeto the back die core, the back die plate and the sliding block assembly, and first sliding grooves used for allowing the ejection needle assembly to move front and back are formed in the back die core and the back die plate; and the oblique pin is inserted into the back end of the interior of the sliding block assembly, the back die plate walks to drive the oblique pin to swing, then the slidingblock assembly is driven to move front and back, and the ejection needle assembly is driven to move front and back in the first sliding grooves. According to the die with the ejection needle on the sliding block, the structure is simple, full-automatic production of submersing type feeding is achieved, it is effectively guaranteed that a glue inlet of a product is formed in the sunken portion ofthe product, product appearance perfection is guaranteed, and the strict requirements of people on the product appearance are met.