On a visit to Belfast ahead of attending the G8 summit in Co Fermanagh, Mr Obama hailed the achievements that had been made to end conflict but insisted much more work was left to do.
Addressing an audience of 2,000 invited guests at the city's Waterfront Hall, the majority of whom were school children, the president said it was up to young people to challenge hardened attitudes and prejudices and push the current generation of political leaders to drive towards lasting reconciliation.
"As all of you know all too well, for all the strides you have made, there's still much work to do," he said.
"There are still people who have not reaped the rewards of peace, there are those who are not convinced that the effort is worth it.
"There are still wounds that have not been healed and communities where tension and mistrust hangs in the air. There are walls that still stand, there are still many miles to go."
He added: "Peace is indeed harder than war. Its constant fragility is part of its beauty. A bullet need only happen once but for peace to work we need to be reminded of its existence again and again and again.
"And that's what we need from you. That's what we need from every young person in Northern Ireland, and that's what we need from every young person around the world. You must remind us of the existence of peace - the possibility of peace. You have to remind us of hope again and again and again. Despite resistance, despite setbacks, despite hardship, despite tragedy, you have to remind us of the future again and again and again.
"I have confidence you will choose that path; you will embrace that task."
Mr Obama, who visited the Republic of Ireland in 2011 but was on his first trip north of the border, pledged America's continued support for Northern Ireland.
"For those who choose the path of peace, the United States of America will be with you every step of the way," he vowed.
"We will always be a wind at your back.
"As I said on our visit two years ago I am convinced that this little island inspires the biggest of things. This little island - its best days are yet ahead."
The president said no-one was naive enough to think peace would be anything other than a long journey.
"This work is as urgent now as it has ever been because there is more to lose now than there has ever been," he said.
Mr Obama travelled to Belfast with his wife Michelle and daughters Sasha and Malia. A massive policing operation surrounded the visit - part of the wider security efforts aimed a delivering a secure G8 summit at the Lough Erne Golf Resort in Co Fermanagh.
Peter Robinson and Martin McGuinness, the First and Deputy First Ministers of the Stormont power-sharing executive, greeted the president on arrival at the Waterfront and held a brief private meeting before Mr Obama's public address.
The First Lady introduced her husband on stage after herself being welcomed to the podium by 16-year-old Belfast schoolgirl Hannah Nelson.
Earlier, the Methodist College pupil delivered a powerful speech to the packed auditorium expressing hope that a permanent peace could be achieved.
Walking to the lectern to rapturous applause, Mr Obama told the audience Northern Ireland was a place of "remarkable beauty and extraordinary history".
In a speech dotted with touches of humour, arguably the biggest cheer came when the president employed the well-known local phrase "What's the craic?".
But the overall tone of the address was a serious one - issuing a challenge to the region's people, especially the younger generation, to not let the gains of peace slip and push for a better future.
"It is within your power to make change," he said.
"Whether you are a good neighbour to someone from the other side of past battles, that is up to you.
"Whether you treat them with the dignity and respect they deserve, that is up to you.
"Whether you let your kids play with kids who attended a different church...that is up to you."
Noting the religious divisions that still exist in Northern Ireland society, Mr Obama suggested the time had come to address challenges such as separated schooling and housing.
"Issues like segregated schools and housing, lack of jobs and opportunity, symbols of history that are sources of pride for some and pain for others - these are not tangential to peace, they are essential to it," he insisted.
"If towns remain divided, it Catholics have their schools and buildings and Protestants have theirs, if we can't see ourselves in one another, if fear and resentment are allowed to hardened, that encourages division, it discourages co-operation.
"Ultimately, peace is not just about politics, it's about attitudes, it's about a sense of empathy, it's about breaking down the divisions we create for ourselves in our own minds and our own hearts that don't exist in any objective reality but we carry with us generation after generation."
Mr Obama acknowledged that there remained those who wanted to bring Northern Ireland back to its violent past.
"This peace in Northern Ireland has been tested over the past 15 years , it has been tested over the past year, it will be tested again," he said.
The president added: "Whenever your peace is attacked you will have to choose whether to respond with the same bravery that you have shown so far or whether you succumb to worst instincts, those impulses that kept this great land divided for too long.
"You will have to choose whether to keep going, forward rather than backward and you should know that as long as you are moving forward America will always stand by you as you do."
As Mr Obama was speaking at the Waterfront Hall a small number of protesting dissident republicans opposed to the Northern Ireland peace process - some masked - marched to Belfast City Hall from a nationalist area in the west of the city.
But they were quickly moved on by police into a neighbouring street where they were hemmed in on the footpath for almost an hour. A 19-year-old man was arrested for a number of offences including disorderly behaviour.
Ahead of Mr Obama's arrival, there was a real sense of excitement inside the Waterfront Hall where the crowd performed a Mexican wave as they waited.
Sinn Fein leader Gerry Adams, Police Service of Northern Ireland (PSNI) Chief Constable Matt Baggott, Olympic gold medal winner Dame Mary Peters and a number of Stormont ministers were among those taking part as the wave did laps round the hall.
Outside the conference centre, a small crowd of well-wishers gathered, hoping to catch a glimpse of the president and his family.
Air Force One had touched down at Aldergrove International Airport, 20 miles north of the city, at 8.35am amid one of the biggest security operations ever mounted in Northern Ireland.
Mr Obama emerged on the steps of the plane wearing his trademark crisp dark suit and clutching his youngest daughter's hand.
He was flown by Marine One helicopter to George Best Belfast City Airport and then travelled by road to the Waterfront Hall convention centre a mile away.
Hundreds of police 4x4s lined the streets, while the PSNI helicopter patrolled the skies over the city and specialist boat units kept watch from the River Lagan.
Thousands of extra police officers were deployed in the region ahead of the G8 summit, including 3,600 from forces in England and Wales.
Mr Obama said the success of the Northern Ireland peace process was important for the whole world as it encouraged others embroiled in conflict to seek another way.
"What happens here has an impact on lives far from here," he said.
"And if you continue your courageous path toward permanent peace and all the social and economic benefits that comes from it, that won't just be good for you, it will be good for this entire island, it will good for the United Kingdom, it will be good for Europe, it will be good for the world.
"We need you to get this right."
Former US president Bill Clinton became the first serving US leader to visit Northern Ireland in 1995 and was a regular visitor during the peace negotiations. George Bush also visited Northern Ireland in 2008.
COMMENT RULES: Comments that are judged to be defamatory, abusive or in bad taste are not acceptable and contributors who consistently fall below certain criteria will be permanently blacklisted. The moderator will not enter into debate with individual contributors and the moderator’s decision is final. It is Belfast Telegraph policy to close comments on court cases, tribunals and active legal investigations. We may also close comments on articles which are being targeted for abuse. Problems with commenting? email@example.com