This paper introduces an improved advanced encryption standard (AES) cipher algorithm by proposing a new algorithm based on magic square to decrease the AES execution time. This is done by replacing Mixcolumn function with magic square of order 6. This paper raises the security level of AES cryptosystem by using another key, which is generated using magic square while decreasing the execution time. For application of encrypting a colouring image, visual studio and MATLAB programs have been used as means for computing results. The results of complexity, time execution, National Institute of Standards and Technology (NIST) tests, histogram, differential attacks and peak signal to noise ratio (PSNR) are computed and compared with the original AES cryptosystem, the original and the proposed algorithms. The proposed algorithm results in reasonable findings under several evaluation metrics. For instance, the complexity of our proposed algorithm is higher than the basic AES while decreases the time execution. The experimental results show that the suggested algorithm provides an efficient and secure way for image encryption. The suggested algorithm leads to leverage the complexity of cipher process as well as to make the linear and differential cryptanalysis harder by pre-process the input image initial step of the proposed AES.