This paper develops a numerical scheme for finding the approximate solution of space fractional order of the diffusion equation (SFODE). Firstly, the compact finite didierence (CFD) with convergence order O(t^2) is used for discretizing time derivative. Afterwards, the spatial fractional derivative is approximated by the Chebyshev collocation method of the fourth kind. Furthermore, time-discrete stability and convergence analysis are presented. Finally, two examples are numerically investigated by the proposed method. The examples illustrate the performance and accuracy of our method compared to existing methods presented in the literature.