Step 1: Understanding the reason for the levy.
Chhatrapati Shivaji Maharaj, during his rule, was focused on strengthening Swarajya (self-rule). One of the methods he employed to support his administration and military was the collection of taxes on essential goods like salt, which would generate income for the state.
Step 2: Historical context.
Shivaji Maharaj’s objective was to raise funds for his administration and to build a strong independent Maratha empire, not specifically to oppose the Portuguese or the British in the salt trade.
Step 3: Conclusion.
Therefore, the correct answer is that Shivaji Maharaj levied octroi on the salt trade to raise funds for Swarajya.
Final Answer:
\[
\boxed{ \; raise \; funds \; for \; Swarajya}
\]