Following those principles allows ministers to serve with joy, even when one is fed up with people, he said.
On the fourth day of a trip that is taking the Pope to three countries with indigenous populations, the Pope urged his listeners, "Don't forget where you came from."
Noting that some priests and religious who grow up speaking an "ancient and noble" indigenous language later give it up, he said: "It's very sad when they don't want to speak it. It means they forgot where they came from."
The Pope drew applause when he dropped local words into his speech. He used "guagua," the Quechua word for "baby," at one point. And in his retelling of the story of Samuel's search for David, who would become king of Israel, Samuel addressed Jesse, David's father, with the Argentine slang word, "che."
Abandoning his prepared text, the Pope used Mary as an example of awareness of God's freely given love.
When priests or religious lose sight of that gift, "we start to feel that we are important and gradually distance ourselves from that starting point from which Mary never strayed," he said.
As the Pope entered the Marian shrine, the site of one of Ecuador's most important religious devotions, priests and sisters crowded close and reached out to touch his vestments.
He placed a bouquet of roses on the altar and prayed before the statue before speaking to the audience.
"Mary was never the protagonist. She was a disciple all her life, her son's first disciple," he said.
He advised his listeners, "Every day, perhaps before you go to sleep, turn your gaze to Jesus and say, 'You have given me everything for free,' and get yourself back on track."
The story of Samuel choosing David, the shepherd boy, is a reminder that "God looks at things differently from the way people do," the Pope said.
"God said, 'that's the one,' and took him out from behind the flock," he said. "Who am I if they took me from behind the flock?"
Warning his listeners against the illness of "spiritual Alzheimer's," Pope Francis said: "Don't forget where you came from. Do not deny your roots."
Awareness of the gratuitous nature of God's gifts -- including the call to a vocation -- and avoiding a false sense of importance give ministers the strength to serve with joy, the Pope said.
The role of priests and religious is "to serve, and nothing else -- and to serve when we are tired, when we are fed up with people," the Pope said. "Those who serve must let themselves get fed up without losing patience."
Service also must be given freely, he said.
"What you received for free, please give it freely. Please do not charge for grace," the Pope said.
Recalling the joy, cordiality and piety with which Ecuadoreans welcomed him during his visit, he told the priests and religious that he had prayed to understand "the recipe" for that attitude of faith.
Part of the answer lies in the country's consecration to the Sacred Heart of Jesus, he said, but "another recipe, along the same line, is the sense of freely given love like that of Jesus, who became poor to enrich us with his poverty -- pure gratuitousness."