The invention discloses a straw harvester with a compression mechanism for agricultural machinery, comprising a main body of the harvester, a compression chamber, a crushing roller, an extrusion plate, a linkage block, a water bag and a push rod. The outer side of the main body of the harvester is arranged There is a header, the inside of the extrusion bin is provided with a movable frame, and the inside of the movable frame is connected with an extrusion plate through a shaft, the side of the fixed block is fixedly provided with a rack, and the inside of the compression bin is provided with a A guide column, the inner shaft of the compression chamber is connected with a sector gear, and a push rod is arranged under the sector gear, a water tank is arranged inside the compression chamber, and a nozzle is installed on the inner side of the compression chamber close to the extrusion chamber . The straw harvester with a compression mechanism for agricultural machinery can crush and compress the harvested straw, effectively reducing the storage space of the straw, facilitating the subsequent collection of straw, and can automatically reduce dust during use, which is practical high.