Dr Barry Morgan will open the Vale Jazz Festival in Barry town centre on Friday, before preaching at the festival service on Sunday at St Mary's Church, Barry.
Speaking about the festival, he said: "I am delighted to be opening the festival and am looking forward to the service on Sunday. Christianity's links with jazz go back a long way - the music came from slaves suffering in the southern states of America when they expressed their feelings by using Biblical imagery and African rhythmic music with hymns such as 'Mine eyes have seen the glory of the coming of the Lord' or songs such as 'When the saints go marching in'.
"So jazz speaks to those who are broken and crushed and borne down by life. But it speaks too of a hope and a longing that somehow God will rescue them. It teaches us to be creative and to improvise - to make the best of the hand we have been given and to cope with the discordant notes that are thrown at us."
About 22 jazz acts will perform in 20 venues around Barry. They include young professional harpist Ben Creighton Griffiths from Cardiff who will play during the service at St Mary's Church.