The invention discloses an automatic testing and sorting machine for an integrated circuit IC chip. The machine comprises a charging tray separating and inputting device, a material boat module device, a qualified product sorting and collecting module and an inferior-quality product sorting and collecting module, wherein the charging tray separating and inputting device can separate stacked material trays one by one; the material boat module device comprises a left material boat for holding chips to be tested and a right material boat for holding the tested chips, and the left material boat and the right material boat are controlled by a servo motor to swing left and right; the qualified product sorting and collecting module is used for holding the chips tested to be qualified in the right material boat; and the inferior-quality product sorting and collecting module is used for holding the chips tested to be unqualified. A tray full of chips to be tested and sorted is automatically input to the right position by the tray separating and inputting device, then, the chips are transferred to the boats by a charging gripper platform device one by one; and the chips to be tested in the left material boat are precisely absorbed and moved to a testing position to be tested by a testing gripper combined module device, then, are placed back to the right material boat to be further conveyed to a sorting position, and finally, are sorted and placed in a corresponding finished product tray or inferior-quality product tray by a discharging and sorting gripper platform device according to the test result, and conveyed out of the machine in order after fully filled in the tray.