Judge Patricia McNamara remanded him in custody after his lawyer made no bail application on his behalf.
The court heard that the offence is alleged to have happened on the M1 south at Baldrumman in north Co Dublin.
Detective Garda Eoin Roche, of the Garda National Drugs Unit, told the court that Mr Donnelly was arrested at the scene on Thursday night and brought to Balbriggan Garda Station where he was charged on Friday morning.
He made no reply after caution.
Gardai have said 39kgs of cannabis was seized with an approximate street value of €234k, subject to analysis.