The invention discloses a technology and a device for removing hydrogen, nitrogen and carbon monoxide from methane rich gas and producing liquefied natural gas (LNG). The technology comprises two parts, namely low-temperature liquefaction and rectification separation after flash evaporation; the low-temperature liquefaction part is finished in a cold box by using cold flow supplied by a mixed refrigerant; in the rectification separation part after flash evaporation, the hydrogen, the nitrogen and the carbon monoxide are removed by adopting a flash evaporation and rectification flow; and after the methane rich mixed gas containing the hydrogen and the nitrogen sequentially passes through the cold box, a re-boiler at the bottom of a rectification tower and the cold box and the methane components are liquefied, the methane rich mixed gas enters a rectification separation system, and the hydrogen, the nitrogen and the carbon monoxide are removed, wherein the obtained LNG product contains less than or equal to 2,000ppm of hydrogen, less than or equal to 4 percent of nitrogen and less than or equal to 6 percent of carbon monoxide. By the natural gas liquefaction technology for the methane rich gas containing the hydrogen, the nitrogen and the carbon monoxide, the hydrogen, the nitrogen and the carbon monoxide are removed, and the LNG is obtained at the same time; the technology is advanced in process route; and compared with the conventional technology, the technology has the advantage that the investment cost of equipment and the energy consumption of the system are remarkably reduced.