Dynamic scheduling is one of the most important key technologies in production and flexible job shop is widespread. Therefore, this paper considers a dynamic flexible job shop scheduling problem considering setup time and random job arrival. To solve this problem, a dynamic scheduling framework based on the improved gene expression programming algorithm is proposed to construct scheduling rules. In this framework, the variable neighborhood search using four efficient neighborhood structures is combined with gene expression programming algorithm. And, an adaptive method adjusting recombination rate and transposition rate in the evolutionary progress is proposed. The test results on 24 groups of instances with different scales show that the improved gene expression programming performs better than the standard gene expression programming, genetic programming, and scheduling rules.