In this paper,a variable environmental factor was added to the classic M/M/1 queuing system model.The arrival environment A and B of customers could be transformed into each other,and the parameters of arrival time could be changed with the environment.The instantaneous probability of environment A and B were calculated by Laplace Transform,and the queue length distribution,waiting queue length distribution and average queue length of the system were obtained by probability generating function.