A 0-0 draw led to the spot kicks that United went on to win, to book their place in the next round which takes place on Saturday, September 7.
Peterhead came out of the blocks in impressive fashion and could have scored twice in the opening three minutes.
First Aiden Smith latched on to a quickly taken free kick but didn’t get the break of the ball inside that area and keeper Kevin Main gathered the loose ball.
A minute later a precision pass forward from Gary Fraser found the returning Rory McAllister but he showed his lack of recent match time shooting wide of the right hand post from 12 yards.
Formartine were kept pinned back in their own half for long spells but with ten minutes gone a lack of concentration by Fraser midway inside his own half allowed Gary McGowan a snap shot from 30 yards but Greg Fleming in the home goal gathered with ease.
In the 18th minute Scott Lisle should have given United the lead as he went on a mazy run inside the area but just when he looked set to bulge the back of the net his shot instead hit the side netting and a great chance was spurned.
That effort seemed to give the visitors confidence and they played the ball around, making the Blue Toon do the running as the roles were reversed.
Jordan Leyden had a great chance to score the opener after Lisle had slid the ball into his path but his low drive from an angle to the left of goal was blocked at the expense of a corner by Fleming.
Peterhead started the second half as they did the first and substitute Scott Brown sent a header into the hands of Main from eight yards and soon after McAllister tried his luck from distance but Main again gathered with ease.
Jamie Stevenson hobbled off with a hamstring injury and with all three subs already on Peterhead were left to play the remaining 25 minutes with ten men.
At the other end Formartine had another good chance, Leyden slipping in McGowan, and it took a sliding block by Jason Brown to prevent a shot on target.
As the ninety minutes drew to a close McAllister again tested Main from distance with an all-too-rare attempt on goal then Jack Leitch missed a sitter as a disappointing cup tie headed towards penalty kicks.
It was United who came out on top 7-6 with the keepers making the difference, Kevin Main saving two with Michael Clark seeing his penalty blocked for the only failure in the shoot out.
Speaking after the match, Formartine boss Paul Lawson said: “I’m delighted and I thought the boys acquitted themselves very well.
“Going to penalties is a bit of a lottery, but I think we probably deserved to go through.
“A home tie is all we’re looking for in the next round.”