Ravi Babu said the piglet would star in his next film called Adhigo, which translates from the Telugu to "there".
Long bank queues have become common after 500 and 1,000 rupee notes were banned in a crackdown on corruption.
"I was taking it to a computer graphics lab when I realised I didn't have money for fuel," Mr Babu told the BBC.
"I stopped at the ATM but had to carry it myself because it squealed when my production assistant tried carrying it.
"You have to hold it with your hand under its chest and hold it close to you to make it feel comfortable."
The picture is being widely circulated on Indian social media.
There have been chaotic scenes in India ever since the currency ban was announced as part of a crackdown on "black money" two weeks ago. People have been queuing up for hours outside banks and cash machines which often are fast running out of money.
The piglet, whose name is Bunty, is one of 25 pigs being reared to star in Babu's film.
"`They just grow too fast. So I am rearing quite a few to ensure the piglet's character looks the same size," he told the BBC.
Standing in line at the ATM in the southern city of Hyderabad, Babu took only about 15 minutes to withdraw 2,000 rupees - with Bunty firmly in hand.
The four people ahead of the star in the queue did not seem too bothered about the piglet and were apparently more concerned about withdrawing money.
It was only when the impatient piglet started protesting that onlookers reacted with amusement.