The invention discloses a condition slicing method based on golden section search and software execution trace. Based on a given first-order predicate logic set, in an interval matching conditions, a variable value is selected as input of dynamic program operation based on a golden section search method, a corresponding statement coverage set is obtained by calculation through an execution trace set of program multi-time operation, and on the basis, combined with static slicing of a program, condition slicing of the program is obtained by calculation. According to the method, global analysis of the program is not needed, thus the efficiency is improved, and the space complexity is low; besides, it is convenient to acquire the execution trace of the program, and acquisition of the execution trace of the program is not influenced by program types, so that the method is applicable to interprocess and concurrent programs and is object-oriented.