Very little is known about the origin of magic squares. Next to nothing is known about the movement of the idea of a magic square before about 1300 AD. Three cultures are known to have created magic squares, the Chinese, the Indian, and the Arabic. In each culture they were viewed as having supernatural properties.
The first magic square in history was created in China by an unknown
mathematician, sometime before the first century AD. "Called
showed first 75 words of 532 total
showed last 75 words of 532 total
have also referred to the Arabs using magic squares in making astrological calculations and predictions" (http://freespace.virgin.net/mark.farrar1/msfmsq01.htm). The association of the squares with astrology and the heavens appears to be original with the Arabs, but again, much is unknown concerning the Indian tradition.