The big losers in the District of Columbia's move toward legalized gambling are the taxpayers of Maryland, whose state government now rakes in an estimated $30 million a year simply because Maryland has a legal lottery and the District does not.

Maryland officials expect to lose all of that money -- 1 percent of the state's projected total revenues for 1981-82 -- after D.C. starts its own lottery, and the droves of city residents who head to the Maryland suburbs every day to buy lottery ticketgs can buy them closer to home.

That prediction was seconded unanimously by dozens of D.C. bettors lined up to buy 50-cent chances on the Free State's daily number at liquor stores just inside the Maryland border.

"I've been coming here every day, betting the same number every time," said 52-year-old Melvin Johnson, a laborer for the D.C. Department of Transportation, as he waited in line at Bass Liquors, a booming lottery outlet just 30 yards over the D.C. line on Rhode Island Avenue. "I work in the District and I live in the District. It'd be better on me to play there," he said.

Levi McFadden, a truck driver for the same agency, added his agreement as he stepped up to buy his tickets. The two men say they cross Eastern Avenue almost every day at lunch hour to buy Maryland lottery tickets.

Within 15 minutes, Johnson, McFadden and five other men had put down more than $100 on numbers of their choice, and five more had crowded into the narrow liquor store for the same purpose. All said they would rather buy their tickets in Washington, to same time and gasoline.

The Bass store and Shop Rite Liquors, just across the Maryland line on New Hampshire Avenie, have the highest volume of lottery ticket sales in the state. Officials say 85 of the top 100 ticket outlets are in Prince George's and Montgomery counties, many of them only a coin's throw from Washington, where most of their patrons live.

The so-called "border stores" along the District of Columbia line account for almost 20 percent of the $167 million that the legalized lottery deposited in the Maryland treasury last year. Unexpected windfalls in daily lottery receipts contributed to the luxurious budget surpluses of recent years.

Maryland fiscal officers wagered all along that the D.C. gambling initiative would pass on Nov. 4, and calculated that the gross losses to the lottery operation would be $65 million. Subtracting prize money and operating costs, they estimated that the net loss from their projected revenue estimates for the 1982 fiscal year would be $30 million.

Although the D.C. lottery realistically is a year away from operation, the loss of much of the booming business along the District line thus becomes an added factor in the state's tightest budget picture in the last four years. Combined with recession-related losses in income and sales tax revenues, the loss of $30 million in lottery profits is expected to slice the Maryland surplus to $55 million in June 1982 -- compared to $293 million last June. That $30 million could operate this year's general fund budget for four days.

The Washington counterparts of the border states have gazed with envy for several years across Eastern and Western avenues, convinced that the magnet of lottery ticket sales gave their Maryland competitors a huge advantage.

Robert Weitzman, owner of Washington's Stop & Shop Liquors just south of the Bass outlet on Rhode Island Avenue, helped plan the District campaign for a legalized lottery. He said he expects his retail liquor business -- as well as the city's revenues -- to grow with the advent of a city lottery.

Many of his Maryland counterparts contest this view, after several years of experience with the daily lottery, which began in 1976. They say it often is more trouble than it's worth; lottery customers jam the store and take up valuable parking space -- and the lottery tickets carry only a 5 percent commission.

Don Gould, one of the owners of Bass Liquors, said he tried without success to rally suburban Maryland lottery agents to fight the District's proposed gambling initiative. "The state lottery commission wouldn't touch it with a 10-foot pole," he said. "They said it was none of Maryland's business."

But Gould said there is an even more important reason that the Maryland lottery agents didn't fight the District's initiative: They're not that scared of losing business -- in lottery tickets or in retail sales -- despite the gloomy predictions from officials in Annapolis.

"Look, the Maryland lottery didn't kill the illegal numbers racket in the District," Gould said, "I'm sure lots of our customers play both. That way they have two chances to win. When the District comes in, they'll have three."

One of Gould's lottery patrons, a veteran of the Washington numbers racket and the Maryland lottery, agreed, sticking with a betting man's tradition of maximizing his chances. In any case, he will not desert the Maryland lottery even if the District of Columbia sets up odds of 600 to 1, compared to Maryland's 500 to 1.

The nattily dressed gambler, who would identify himself only as "Larry," said he has been playing and winning the numbers game since he was 8 years old. Since the Maryland lottery has been good to him -- "I hit on number 429 last week for $1,000 right here" -- and since he is a confirmed believer in superstition, he will stick with it.

"Some people say I'm just lucky," he said, smiling proudly. "But when I was a body, the older people used to put it different. They said I was blessed."