With custody of her daughter, Margaret struggled financially, especially after her husband stopped ceased sending support payments. What money she did have she used on dancing lessons, learning the Oriental dances she had seen in Java. After sending her daughter to live with relatives, she embarked upon her new career, performing the mysterious dances of the god Siva. Her early efforts were unsuccessful, as she was unable to secure bookings and was alleged to have worked as a prostitute for a period of time.

When World War I broke out, Mata Hari had decided to engage in another exciting profession - espionage. Having already engaged in numerous affairs with numerous wealthy men and counted many of the most important people in the military and intelligence community as her paramours.

The Chief of the Berlin Police Department, Traugott von Jagow was one of them and he suggested to her that she include pillow talk in her meeting with her important clients, obtaining secrets as well as money from them. She was given the German code number H.21, which would prove significant years later.

Traveled throughout Europe, attending embassy functions and social occasions meetings military and political contacts. Having seduced the men, she would pry information about troops and weaponry as well as political alliances and military tactics. She reported this information back to Jagow and was positioning herself neatly when the War began.

Having been granted German citizenship, she was ordered to make her way into France where she began passing secrets to the Germans. Although French agents kept her under surveillance, they were unable to collect sufficient evidence against her to arrest her. Much of her information, at this point, was vital, helping to prepare the Germans develop their strategy to overpower the French troops.