Ex-serviceman Arthur Utley, who took part in the Normandy landings, was given the honour of running the standard up the flagpole above Willenhall library which will be its permanent base.
Visitors from Willenhall's twin town of Drancy in France were among special guests at the launch.
The red and blue flag, featuring padlocks and keys reflecting the town's leading part in the lock manufacturing industry, was chosen from 68 entries in a competition organised by community website willenhallaywe.co.uk.
A panel of judges picked the best six and left it to the public to choose their favourite. The flag, designed by Adam Leonard, has since been officially registered with the Flag Institute.
A plaque on the front of the building recording the achievement was unveiled by Councillor Peter Smith, Mayor of Walsall. A flag was also presented to the French visitors.
Afterwards the party enjoyed a buffet in the upstairs section of the library where the Willenhall Council used to meet when it was an urban authority.
The French guests included Michel Lastapis, Dancy's deputy mayor, Luisa Pilmannl, a councillor for women's rights, Stéphane Bouthors, chairman of the Drancy Twinning Committee, and Michele Servais, committee treasurer.
Competition organiser Kalie Plant said: "This was the final piece in the jigsaw. A flag has got to be flown and it needs an official home, now it has got one.
"It's taken a year from start to finish, and a lot of hard work along the way, so it was great to see the flag finally flying."
She said the competition was organised to help boost Willenhall's identity.
"Willenhall is shrinking. The manufacturing that used to thrive here has all but gone and it has been in danger of becoming a ghost town.
"But we're very proud of our home town. The flag is a symbol for the community and hopefully it will help to raise the profile of the area."