John Nicholas Brown, who inherited one of the oldest fortunes in the United States and became a noted philanthropist and patron of the arts, died of an apprarent heart attack Tuesday on his yacht in Annapolis. He was 79.

Mr. Brown and his wife, the former Anne Seddon Kinsolving of Baltimore, were in Washington to celebrate the 45th birthday of their younger son, J. Carter Brown, the director of the National Gallery of Arts.

Home for Mr. Brown was Providence and Newport, R.I., where his family had lived and prospered since 1638. Although he was born in New York City, it was in Providence that Mr. Brown, a tall, shy and soft-spoken man who avoided publicity, first came to national attention. The press dubbed him "the richest baby in the world."

"I grew up an American legend," he said in an interview shortly before his 70th birthday. "Very little of it is true. They wrote an awful lot of crazy things. They said I had a special cow to provide milk. What a lot of nonsense!"

What was true was that both Mr. brown's father and his uncle died shortly after his birth. Thus he became sole heir to a fortune that was estimated at the time at $10 million in liquid assests and perhaps $50 million altogether.

What is also true is that Mr. Brown used his inheritance to promote art, scholarship, the Episcopal Church and a private passion for the sea. The yachts he owned during his lifetime -- all of which were named after dances -- included some of the most sucessful ocean racers of this century.

He was a regent of the Smithsonian Institution, the founder of the Medieval Academy of America, a trustee of the Byzantine Institute and of the American School for Classical Studies at Athens, Greece, a member of the advisory and executive committees of Brown University, which bears the family name (he himself was educated at Harvard), and a delegate to several conventions of the Episcopal Church.

He also took a leading role in preserving several historical landmarks in Providence and elsewhere in Rhode Island. At the age of 24, he donated a Gothic chapel to St. George's School for boys in Rhode Island that reportedly cost $1 million. He built a library for Brown University.

During the Great Depression, Mr. Brown took charge of the family's wide-ranging business affairs. The fortune was built on trade in colonial times, including the triangular trade in rum, molasses and slaves. Browns took part in sinking a British revenue cutter at the outbreak of the Revolutionary War. Later, the family went into the iron business, making cannon and other weapons. They went into the China trade, and they started the first cotton mill in the United States. They had large farming and ranching interests in the Middle West.

This empire nearly went under during the Depression for want of cash. Mr. Brown consolidated many of his holdings, made them profitable, and sold others. Some land in the Middle West was sold. Other land was bought and stocked with Hereford cattle. All of this was done through The Counting House Corp. in providence, of which Mr. Brown was president.

In "The Browns of Providence Plantation," James Hedges, a professor of history at Yale University, wrote: "Other American business families have achieved greater prominence within a single generation; but it is doubtful that the chronicle of any other family would show so much substantial achievement in so many areas through so many years of changing conditions and circumstances. . . . The secret of their long sustaining success lay primarily in . . . careful planning from one generation to the next."

During World War II, Mr. Brown headed a mission in the Army, the purpose of which was to return art treasures looted by the Nzies to their-rightful owners. After the war, he served for three years as assistant secretary of the Navy for air. The job paid $9,800 a year at that time and it was the only salaried work that Mr. Brown ever did.

On hearing of Mr. Brown's death, Gov. Joseph Garrahy of Rhode Island called him "one of Rhode Island's most distinguished citizens." Sen. Claiborne Pell (D-R.I.) said, "I have known, admired and had the greastest affection for John Brown ever since I was a child. He was a wonderful gentleman who epitomized the qualities so many of us lack."

S. Dillon Ripley, the secretary of the Smithsonian, issued a statement in which he recalled that Mr. Brown received the Joseph Henry Medal from the Smithsonian in 1975.

"The citation accompanying the medal praised Mr. Brown for his perceptive and unassuming leadership in matters of taste and culture,'" Ripley said. "He had a lifelong interest in the arts and dedicated a large part of his life to public service."

In addition to his wife and his son Carter, of Washington, Mr. Brown is survived by two other children, Nicholas, a captain in the Navy, also of Washington, and Angela Bayard Fisher of Boston.