When Geico Corp. was trying in 1976 to lure John J. Byrne away from Travelers Insurance Co. of Connecticut, the Bethesda insurance company was almost bankrupt and desperate for someone who could turn the business around.

Anyone willing to tackle the chief executive's job at Geico could write his own ticket.

Byrne gave up his job as Travelers' executive vice president and took a pay cut to $150,000 a year in return for a contract guaranteeing him a piece of any profits Geico could make. The deal offered an annual bonus based on Geico's earnings plus stock options that would be worthless if Geico failed to turn around.

Geico lost $26 million the year Byrne went aboard, but in the four years since then its profits have totaled $281 million.

Last year, for the second year in a row, Geico's earnings qualified Byrne for a $600,000 bonus -- the maximum permitted under his contract. With his regular salary, fringe benefits and stock options, Byrne became the highest-paid executive in Washington and one of the 10 best-paid businessmen in the country.

Byrne earned $976,887 in direct compensation and had a profit of $1,397,000 on his stock options at the time they were exercized, for an annual income of $2,373,000.

Geico's continuing comeback has pushed the stock even higher and, as of last week, Byrne's profit on his stock options had climbed to $3.6 million, making his 1980 compensation worth $4.6 million.

That put Byrne far ahead of anyone else on a Washington Business survey of executive pay and prerequisites.

His $2.37 million per year would rank Byrne among the 10 highest-paid executives on Business Week magazine's annual survey of pay and perks at 252 U.S. corporations.

Geico wasn't one of the companies surveyed by Business Week, which gave its "best paid" title to Robert Charple, president of Cabot Corp., a diversified energy company that paid Charple $3.33 million last year.

If he'd been on the Business Week list, Byrne would have ranked behind the bosses at NL Industries, Exxon, Union Pacific, Union Oil, General Dynamics and Standard Oil of Indiana. He earned more than the chief executives of Rockwell International, Esmark, Hughes Tool, AMAX, Shell Oil, Time Inc. and Atlantic Richfield and the rest of the Fortune 500.

After Byrne, second place on the Washington business pay scale goes to J. Donald Rauth, chairman of Martin Marietta Corp., who earned $591,667 in salary and bonuses and $287,420 in other compensation for a $879,087 year.

Third place is a toss-up between George Olmsted, chairman of International Bank, who earned $553,571, and Edward G. Uhl, chairman of Fairchild Industries at $554,080.

Next on the local list come J. W. Marriott, Jr., president of Marriott Corp. at $502,610; Sheldon W. Fantle, president of Peoples Drug Stores at $401,095; Katharine Graham, chairman of The Washington Post Co. at $361,700; L. Stanley Crane, who retired as chairman of Southern Railway Co. after earning $338,690; and Edwin K. Hoffman, chairman of Woodward & Lothrop, at $318,121.

Those figures, compiled by Washington Post researcher Bridget Roeber from company reports, reflect income that was earned last year but not necessarily paid.

Many of the executives at the top of the pay scale have contracts enabling them to defer part of their income and minimize their income taxes. Geico helps out by giving Byrne and other officers financial counseling and tax advice at corporate expense.

Byrne's big bonus represents a trend toward linking management compensation directly to company performance. Most of the major corporations in the Washington area now have some such plans; the bigger and more aggressive the company, the more likely it is to offer a management incentive plan.

Boards of directors like such deals because they avoid the embarassment of paying big salaries to executives who don't perform. As Woodies' Hoffman commented when stockholders complained about his new incentive plan last week, "If we don't make our goals, nobody gets a dime."

For an adventurous executive like Byrne or Hoffman, an incentive plan offers a chance to stake his future on his own ability.

Byrne describes the deal that made him a millionaire as "a contractual agreement between myself and the owners of the company.

"I had to take a cut in salary. The risk was great," he said. "The reward side was very appealing. It worked out very well for me. The owners seem to think it worked out well for them."

Byrne's original contract entitled him to a bonus of one percent of the company's first $12.5 million in profits and 2 percent of any additional profits up to a maximum of $600,000, plus the stock options.

The stock options gave Byrne the right after five years to buy 209,741 shares of Geico stock for $4.589 a share.

The stock was between $10 and $11 a share last year when Byrne exercized his options and bought the stock, using $962,500 borrowed from the company at 6 percent interest.

On top of his $750,000 in salary and bonus, Byrne earned $32,875 in director's and other fees, got a low-interest loan from the company that was worth $81,174 and qualified for retirement benefits and other remuneration of $112,838.

The loan was granted as an incentive to Byrne to sign a new 10-year contract that gives him a $75,000-a-year raise but eliminates the opportunity for another big bonus.

The Geico chief executive's 1980 windfall will be outdone this year by the $5.8 million buyout of the principal owners of Drug Fair Inc. Under a plan to sell the local chain to Gray Drug Stores Inc. that was ratified last week, Drug Fair shareholders will get $20 a share for their stock.

For their nearly 190,000 shares, Drug Fair's President Milton L. Elsberg and his wife Rita will get nearly $5.8 million. That represents the fruits of a lifetime that the Elsbergs invested in building Drug Fair into one of the biggest retail operations in the Washington area.

Another once-in-a-lifetime windfall went to former Washington Post Co. President Mark J. Meagher, who resigned after three years in that job and since has become president of Penthouse magazine. Meagher's complex severance settlement is worth nearly $1.8 million.

On his termination date, Meagher held options to buy 52,000 shares of Washington Post Class B stock at well below market price. Rather than exercise the options, Meagher gave them back in exchange for a cash payment of $537,587 -- the amount he could have made by buying the stock.

In addition, Meagher will be paid $83,900 a year for 15 years starting next January and will become eligible for a pension from his old employer when he reaches age 65.

Although the compensation for work in Washington is more often measured in power than in perquisites, the private sector of the District of Columbia economy increasingly is offering world-class salaries to its top executives.

President Ronald Reagan's $200,000-a-year salary puts him in the middle echelon of Washington chief executives, but White House perks are unmatched in the business world.

The $79,125 a year for Vice President George Bush, the $69,630 for Cabinet members and the $60,662 for Members of Congress wouldn't even make the cut on a list of top local business earnings.

At the publicly owned companies and quasi-government agencies that are required by law to disclose the income of top officials, there are plenty of quarter-million-a-year men.

And virtually all of them are men.

The highest-paid woman in Washington apparently is Katharine Graham with a $266,700 salary and a $95,000 bonus.

The only other woman who shows up on the $100,000-plus list is Vivian S. Woods, vice president of Woodward & Lothrop, who earned $114,264 as the department store's top merchandiser.

Hanne Merriman, executive vice president of Garfinckel's; stockbroker Julia Walsh, who owns her own firm, Julia M. Walsh and Son; and real estate broker Flaxie M. Pinkett, recently named "Man of the Years" by the Greater Washington Board of Trade, might make more, but their salaries are not public knowledge.

Plenty of Washington superlawyers, some of the top stockbrokers and the proprietors of privately owned firms undoubtedly earn as much or more than executives of public companies.

When Joseph Califano joined Jimmy Carter's Cabinet, his disclosure that as a Washington lawyer he had earned $600,000 the previous year illustrates the loftier ranges of the local legal profession.

Brokers had an unusually good year in 1980 and several of the so-called "producers" in Washington offices earned commissions of more than $150,000 last year. What they made (or lost) in the market, nobody knows.

Companies that sell stock to the public must disclose the pay of top executives every year in the notice announcing their annual shareholders meeting.

The compensation section can take up several pages of the annual meeting notice, with elaborate footnotes and explanations. Even then it is often difficult to figure out who earned what.

The pay reported to shareholders doesn't include all the possible ways in which corporate executives can be compensated. Executives with extensive holdings in their company's stocks can collect more in dividends than they take out in salary, particularly if they own a major portion of the firm.

S. Solon Cohen, chairman of Solon Automated Services, one of the biggest operators of coin laundry equipment in the country, was paid a modest $63,837 salary last year and another $7,000 in other benefits. But Cohens owns 51 percent of the company he founded, or 1,477,000 shares; the 12-cents-a-share dividend on the stock produced another $177,000 in income.

At Marriott Corp., about 25 percent of the stock -- 6,275,000 shares -- still are owned by family members. At 24 cents a share, the various family members and trusts collected more than $1.5 million in dividends.

Israel Cohen at Giant, John Hechinger and Richard England at Hechinger Co. and the Grahams of The Post are among the Washington business founders who profited from similar arrangements. CAPTION: Chart, Some Area Executives and Compensation; Picture 1, John J. Byrne, $2,373,000; Picture 2, George Olmstead, $553,571; Picture 3, Sheldon W. Fantle, $401,095; Picture 4, Edward G. Uhl, $554,080; Picture 5, J. W. Marriott Jr., $502,610; Picture 6, L. Stanley Crane, $338,690, Photos by The Washington Post