Sylvia E. Nilsen, 60, who was deputy assistant legal adviser for treaty affairs at the State Department for many years, died of cancer Sunday at Doctors Hospital.

At her retirement in March, 1975, she was acting legal adviser for treaty affairs. She had joined the State Department as a treaty analyst in 1946, became an attorney adviser in 1958, and was named deputy assistant legal adviser in 1963.

Miss Nilsen had been a member of numerous U.S. delegations to conferances on treaties in Brussels. Vienna, Strasbourg, Paris and Stockholm, as well as in Washington.

In 1960, she played a key role in the signing of the Japan-United States Security Treaty. She explained then that her office had nothing to do with negotiating but was concerned with drafting the text and selecting the terminology. The office also was responsible for staging the signing ceremonies.

In 1961, Miss Nilsen participated in the United Nations Conference on Diplomatic Relations and Immuninites in Vienna. That conference made the first formal changes in the rules governing diplomatic practices since they were formulated by the Congress of Vienna in 1815.

She also contributed to the 1972 Seabed Arms Control Treaty, signed by the United States, Russia and the United Kingdom, and the 1975 international conventions prohibiting the use of chemical and biological weapons.

Born in Utah, Miss Nilsen graduated from the University of Utah and worked for the U.S. War Department offices in Provo before coming here in 1944.

She was employed by the Civil Service Commission and then the State Department while earning a doctor of jurisprudence degree from George Washington University, where she was a member of the Law Review staff. She graduated in 1948 and was admitted to the D.C. Bar.

Miss Nilsen, who lived in Washington, had taught dancing professionally. She had initiated a keep fit dancing group while she was a member of the special interests group of the Chevy Chase Ward of the Church of Jeses Christ of Latter-day Saints. The dance group is still active.

There are no immediate survivors.