The invention relates to a method for extracting gold, silver, platinum and palladium from electronic waste and belongs to the field of resource utilization of the waste. The method comprises the following steps: gathering metals by using pretreatment, carrying out acid pickling and gathering precious metals, leaching the precious metals by using high-pressure chlorine gas, leaching gold, platinum and palladium for one step, extracting, separating and extracting gold, carrying out chemical precipitation, separating and extracting platinum and palladium, and extracting silver by using an ammoniation method. Through the method for extracting gold, silver, platinum and palladium from the electronic waste, the resource utilization of the electronic waste can be implemented; the extraction of gold, silver, platinum and palladium in the electronic waste can be implemented; the gold, silver, platinum and palladium are high in recovery rate, low in cost, short in process, few in environment hazards and low in yield of waste water and waste gas.