Fulfilling a boyhood fantasy and fully confident of victory, Andrew P. Miller whistlestopped across Virginia today, pledging to seek an end to feuding among the state's regions if he becomes governor.

Campaigning aboard a rented five-car train pulled by a 74-year-old steam engine, the candidate for the Democratic gubernatorial nomination repeatedly assured his train station audiences that he - not his opponent in Tuesday's primary, Henry E. Howell - can best run the state government.

At times Miller, 44, a former state attorney general, could not conceal his optimism. "In Southwest Virginia they have a saying: 'Run scared and win big'," he told a sendoff crowd of about 200 at the Alexandria train station. "And that's exactly what we're going to do: Run scared and win big."

The 104-mile train ride from Alexandria to Charlottesville, believed to be unprecedented for any state candidate in recent times, was the climax of Miller's $1 million, six-month long campaign against Howell, a former lieutenant governor. Howell has been campaigning across the state in a borrowed camper, spending today in the hometown of Norfolk.

The $5,000 train trip, conceived by Miller because of his teen-age fondness for trains, probably was not the financial success his staff had hoped. Nevertheless, Miller, 44, was clearly buoyed by the trip and the increasingly large crowds the train attracted as it left Northern Virginia.

At the aging red brick train station here, Miller recalled that Lyndon Johnson had stopped there on another campaign train in 1960. He then paraphased one of Johnson's most famous lines aboutt Richard Nixon. Miller asked a crowd of 200: "What has Henry Howell ever done for Culpeper?"

Earlier in the tiny farming town of Remington (population 350) about half the town turned out to line the railroad tracks. There Miller inoked a line of Gen. Douglas MacArthur. "I don't know when the last governor came to Remington, but one thing I promise you: I will return."

In Alexandria, Miller began the day withe a strong pitch to Norther Virginia, promising to be sympathetic to the region's mass transit needs and saying he would "start to end that isolation" from state government that many Northern Virginians have traditionally felt.

Although less than half of the train's 220 seats were filled with paying Miller supporters as it left Alexandria, Miller walked the aisles in a relaxed mood as the train rolled through the Fairfax County suburbs. He discovered a number of the riders were railroad buffs from outside Virginia. He also met Mrs. Andrew P. Miller, a distant relative from Virginia Beach whose husband shares his name. She said her telephone hasn't stopped ringing since Miller began campaigning in January. LIke many of the railroad buffs, Mrs. Miller, wife of a Navy officer, is not a registered Virginia voter.

Town and county officials turned out to greet Miller and praise him. Culpeper County Board Chairman Roy Burke became so excited that he introduced Miller as "the next governor of the United States."

Miller spent more than 90 minutes riding in the train cab, stoking coal ("Virginia coal," he later noted) into the boiler of the 107-ton locomotive, blowing its shrill whislte, and holding the metal throttle at a steady 24 miles an hour.

"It's fantastc," MIller said as he hopped down from the cab at Remington. "This is more fun than we've had the entire campaign," agreed his wife, Doris, who joined her husband and three children for the ride.

There was some serious politicking aboard "The Andy Miller Special," as the train was dubbed by Miller's staff. Miller pledged that he would work for improve education for the handicapped, more jobs, low taxes and better roads.

And, as he has for the past week, Miller repeated his call for conservatives and other former Democrats too return to the party and vote in Tuesday's election. "We finally have a candidate we can all rally around," said Del. Alson H. Smith, a Winchester Democrat who supported Republican Gov. Mills E. Godwin against Howell in 1973.

Meanwhile, Howell toured his home city of Norfolk promising economy in government and pleading for heavy turnout from the people who know him best.

"We're going to get that government so frugal that Jimmy Carter's going to come down here to see how we do it," he told a breakfast of labor leaders.

"But we need every voter. You got to find your friends and neighbors. You've got to go to church and talk to them . . . just like it was Easter . . . just like your just like your Daddy did."

"Even Mills Godwin is trying too put little Andy across," Howell told a meeting of longshoremen later in the day at Local 1248's hiring hall.

Jim Turner of the United Automobile Workers told Howell at the breakfast, "This is a election where apathy can help us . . . the big bankers, the big insurance companies won't be running phone banks to get their people out. We will."

But as Howell drifted around Norfolk on this bright and flawless summer day, the size of the turnout there remained very much in question.

There were no crowds to meet him, and advance work was to lacking that he was kicked out of a PTA-sponsored flea market in Ocean View - traditionally one of his strongest neighborhoods - and chastised later for handing out leaflets in a shopping mall.

But the candidate seemed cheerfully resigned and never lost his sense of humor.

"What we ought to do." he said after one aimless foray with the Howell camper through a nearly deserted neighborhood, "is go over to the Ocean View Democratic and Social Club, have a couple of cool ones, and quit."