Midnight comes to the Hub with the roar of landing cargo jets, a clanging of bells andthe whoosh of 17 1/2 miles of conveyor belts lumbering into motion. Minutes later, Federal Express' nightly miracle of sorting as many as 160,000 incoming packages and shipping them out again -- all within two hours -- gets under way.

The $98 million Hub is the center of activity for Federal Express, the company that invented the concept of overnight delivery of letters and packages from any part of the country to any other. Despite growing competition, Federal Express continues to dominate the field, having prospered in just nine years to a point where its annual revenues now approach $1 billion.

Even the entry into the field last month of United Parcel Service, the leader in nationwide two-day delivery of packages, has failed to dim Federal Express' luster. The company has shown what one Wall Street analyst, Rollins Maxwell of E. F. Hutton, called "a lot of competitive muscle." Another analyst, John V. Pincavage of Paine Webber Mitchell Hutchins, said, "We haven't seen any impact from UPS coming into the market." His firm placed Federal Express back on the recommended buy list in mid-October after removing it a month earlier because of the potential threat from UPS.

Federal Express' current success sprang from a most inauspicious start in March 1973, when the first night's sort consisted of only 18 packages. The company lost $27 million during its first two years of operation, but finally moved into the black in 1976. Its profits have been soaring ever since at an incredible rate of 76 percent a year.

The key to Federal Express' rapid rise is the unlikely sounding, highly original and nongeometric notion that the fastest way to move cargo between any two points in the United States is through Memphis. So a package from San Francisco destined for Los Angeles, about 350 miles away, takes an 1,800-mile detour to Memphis and still arrives at its destination the next day.

That concept was the brainchild of Federal Express' founder, 38-year-old Frederick W. Smith, who first raised the idea in an economic term paper at Yale University that drew a gentleman's C from a skeptical professor. (Academics generally have shown little enthusiasm toward Federal Express' chance for success. When the company was still struggling, according to Senior Vice President for Finance John C. Miller, Harvard Business School used it as a case study of a failing company. By 1976, Harvard had changed its tune on Federal Express and switched to a case study on how an innovative company can prosper.)

"The idea of a hub is not so creative," said Smith, apparently a bit tired of being asked what made him hit upon his novel concept. "Ask any communications engineer. He knows that you have to run your lines through a central junction box. So I recognized that what was needed was a different kind of logistical system. That was the genesis of Federal Express.

"The system is not so weird once you start thinking of how things work. It's not as weird as me going from Memphis to Chattanoga by flying Delta to Atlanta first."

Smith acknowledged he was lucky he didn't pursue his plan when it first came to him in 1965 because he realizes now that the nation's economy was not ready for it. "If I had tried it at that time," he said during an interview at company headquarters here, "it would have been an abysmal failure."

So his detour to Marine Corps service in Vietnam gave the United States a chance to catch up with his idea.

While he was overseas, Smith said, America's computer and electronics industries blossomed, creating a need for rapid delivery of small spare parts around the country. Those were the industries that he originally saw as Federal Express' major customers. Smith said 65 percent of Federal Express revenues come from those industries, which he feels neither the Post Office nor traditional air freight companies are equipped to serve.

Previously, air freight was flown as cargo on regularly scheduled airlines on a space-available basis, which made it impossible to guarantee delivery at a set time. Smith, though, decided there were enough customers who would pay a premium for overnight delivery to warrant developing a fleet of all-cargo planes for Federal Express. The company now owns four DC10s, 33 Boeing 727s and 32 small Falcons, and has contracted to buy 20 more 727s, including 15 stretched, all-weather models.

In addition, the company operates more than 4,000 radio-equipped vans that pick up and deliver packages from about 400,000 customers. It runs a network of 180 offices throughout the United States, connected by the company's own communications system, and provides daily service to 275 major markets. Company officials figure that Federal Express covers 76 percent of the population with overnight delivery.

The heaviest volume of shipments runs from New York to Los Angeles, New York to Chicago, and Chicago to Los Angeles. The busiest single center is in midtown New York, on 43rd Street, while the downtown Washington center at 17th Street between K and L streets is the second busiest. Most Washington shipments consist of paper, reflecting the city's chief industry.

Federal Express' wide network has allowed it to outdistance the traditional air freight companies, which came in late in an attempt to siphon off some of the overnight delivery business. Last year Federal Express carried 32 million shipments, more than the long-time leader in air freight, Emery Air Freight.

The U.S. Postal Service is trying to enter the market with the promise of a less expensive overnight "express mail," but it does not offer the pick-up service that is a major selling point for Federal Express and Emery. Furthermore, it is stuck with the image of deteriorating services, one of the factors that helped fuel the rapid growth of the private companies.

Purolator Courier has gained ground in the short-haul area, within a 400-mile range where it can use trucks, which are less expensive to operate than planes.

While the competitors are "trying to expand their systems," none has been able to capture Federal Express' "unique market niche," said security analyst William Legg of Alex Brown, who follows the industry.

Federal Express moves more than twice as many packages a night as UPS, its nearest competitor, whose load is estimated by Wall Street analyst Pincavage at between 60,000 and 70,000 parcels, including two-night as well as overnight delivery.

Emery follows with about 31,000 small package movements a night, while Airborne Freight carries about 23,000 a night and Purolator about 10,000. Purolator's overnight truck-hauling, however, amounts to about 300,000 a night.

Federal Express' estimated net income of $83 million also far outdistances its competitors: Emery with about $14.5 million and Airborne with between $4 million and $5 million.

Federal Express reacted to the increased competition with the promise that as of Oct. 18 its overnight letters and packages would be delivered by 10:30 a.m. instead of noon, which executives here believe gives businessmen time to read and act on the material they have received before lunch. To do this, Federal Express added 1,000 new workers at a cost of $18 million a year.

"Bringing it out this month was prompted by the UPS situation," said senior vice president Miller.

This kind of go-get-'em spirit seems to permeate Federal Express, from its top executives to the part-time workers -- most of them students at Memphis State University -- who staff the Hub.

The Hub vibrates with activity as the planes pour in and the conveyor belts become loaded with packages, each pushed off into the proper slot for its final destination. The intensity can be felt, especially as the peak hour of 1:30 in the morning approaches. The sort starts at 12:05 a.m. and, if all the planes are to reach their destinations in time for packages to be delivered by 10:30, must shut down by 2:15.

"I go out to the Hub every once in the while to get my motor charged up," said James R. Riedmeyer, senior vice president for maintenence and engineering who is responsible for keeping the planes flying.