The 19-year-old, a member of the Scottish Rugby Academy who can also play full-back, has started the U20s' recent matches with Ireland and France.
Graham, the nephew of ex-Scotland lock Scott MacLeod, came to prominence with a sensational score against Australia in last year's World U20 Championship.
He will join Edinburgh for the start of next season.
"Darcy is one of the most exciting prospects in Scottish rugby," said Edinburgh's acting head coach, Duncan Hodge, who will remain backs coach when Richard Cockerill takes over this summer.
"He's an extremely talented rugby player and a natural athlete. With the commitment and competitive drive he possesses, we're sure he'll thrive in a fully-professional environment."
Graham said: "I'm fully aware the professional environment will be a big step up but I'm excited to get involved and challenge myself to keep learning from the coaches and players around me."
Edinburgh have signed Hawick's Scotland Under-20s wing Darcy Graham on a two-year professional deal.