The first part of that word, Sanskrit maha, is related to the Greek mega, meaning "great, big." You can see that same root in other Sanskrit words such as maharaja, mahatma, and mahayana, and also in the title of the epic: Mahabharata.
You can read about the "language of the mahouts" and the words they used to issue commands to their elephants here: Mahouts' unique dialect to communicate with jumbos.