Roy Stuart Arbon, a New Zealand citizen, was arrested at Perth International Airport in February 2016.
The drugs were concealed in a suitcase he brought from Brazil.
He told authorities he had been given the bag by a Nigerian man in Brazil named "Anthony Lambert".
The court heard he told authorities he was taking the suitcase to India "as a favour", and he had checked it and believed it only contained clothes.
But Mr Arbon said he had not been able to go to India because he did not have a certificate for yellow fever vaccination.
The court heard two-and-a-half kilograms of powder was found in the bag, two kilograms of which was cocaine, estimated to be worth between $700,000 and $1.4 million.
Accused 'targeted by international criminal enterprise'
Border Force officer Christopher Brown told the court Mr Arbon had claimed he was trying to organise a loan of $US120,000 with a Nigerian man named "Doctor William Johnson" who had approached him via the internet.
Mr Arbon said he had intended to sign some loan documents in India, but told a Border Force officer he was to meet Dr Johnson in Sydney for this.
The Border Force officer said Mr Arbon told him of a previous occasion when he brought two suitcases from India to Perth, to be collected by two men of Indian descent.
Mr Arbon's defence lawyer said her client, who was a beekeeper in New Zealand, fell victim to online scammers.
Ms Oliver told the court that her client was an "innocent victim of a criminal enterprise who targeted him online".
She said Mr Arbon was a "good person" who did not know he was involved in trafficking drugs.
Prosecutor Edward Fitzpatrick cautioned the jury against having sympathy or prejudice for Mr Arbon, despite the fact he "seems a rather grandfatherly man".
The trial continues.