Hyperspectral remote sensing images typically have mixed rather than pure pixels. Endmember extraction aims to find a group of endmembers to represent the original image. In fact, the amount of endmembers is not easily determined in the existing endmember extraction studies.It requires several separate and laborious runs in order to produce results for endmember extraction with varying numbers of endmembers. There is also a correlation between the individual runs, which should be taken into account to accelerate algorithm convergence and improve accuracy. In this paper, an evolutionary competition multitasking optimization method (CMTEE) is proposed to achieve endmember extraction. In the proposed method, endmember extraction problems with different numbers of endmembers are considered as a group of optimization tasks. Specially, these tasks are assumed to be competitive. Then, online resource allocation is employed to assign suitable computational resources to the considered tasks. Experiments on simulated and real hyperspectral datasets demonstrated the effectiveness of the proposed evolutionary competition multitasking optimization method for endmember extraction.