U.S. existing-home sales and prices fell in August from the prior month as mortgage rates climbed toward their highest level in 14 years.

Sales of previously owned homes dropped 0.4% in August from July to a seasonally adjusted annual rate of 4.8 million, the weakest rate since May 2020, the National Association of Realtors said Wednesday. August sales fell 19.9% from a year earlier.

The housing market has slowed in recent months—with seven months of monthly sales declines through August—as the Federal Reserve aggressively raises interest rates to cool the economy and bring down high inflation. That has led to higher mortgage-interest rates and increased borrowing costs for home buyers by hundreds of dollars a month, pushing many out of the market. The average rate on a 30-year fixed-rate mortgage was 6.02% in the week ended Sept. 15, up from 2.86% a year earlier, according to housing-finance agency Freddie Mac.

But the number of homes for sale is still below normal levels. While home prices have fallen from their springtime peaks in some markets, prices remain above where they stood a year ago.

The median existing-home price rose 7.7% in August from a year earlier to $389,500, NAR said. Prices fell month-over-month for the second straight month after reaching a record high of $413,800 in June. While prices typically decrease in the late summer, the monthly declines have been bigger than normal, said Lawrence Yun, NAR’s chief economist.

“The rising mortgage rate has clearly hampered the housing market,” Mr. Yun said.

Economists surveyed by The Wall Street Journal had expected a 2.7% monthly decline in August in sales of previously owned homes, which make up most of the housing market.

The combination of high prices and rising interest rates has pushed home-buying affordability near its lowest level in decades, making it especially difficult for first-time buyers to enter the market. 

General economic uncertainty is also keeping buyers on the sidelines, according to Odeta Kushi, deputy chief economist at First American Financial Corp. “To make the biggest financial decision of your life, you need to have some confidence in the economy, in your job, in the labor market,” she said.

Philip Natale went under contract to buy a new home in Henderson, Nev., in December. By the time he locked in an interest rate this spring, rates had climbed from around 3% to above 5%, pushing up his monthly payment by several hundred dollars.

“It’s horrible,” he said, but he hopes to refinance the loan at a lower rate within the next year or two. “The first 12 to 18 payments are probably going to be a big bummer,” he added.

To save on costs, Mr. Natale is eating out less and has decided to delay buying a car. “I just don’t want to feel the stress of adding a car at the same time as I’m buying a home,” he said.

In the four weeks ended Sept. 11, 7.2% of homes on the market each week had a price drop, up from 3.8% a year earlier, according to real-estate brokerage Redfin Corp.

Homes on average sold for 0.5% below their final list price, compared with 1.1% above list price a year earlier.

The typical home sold in August was on the market for 16 days, up from 14 days from the prior month, NAR said.

Nationally, there were 1.28 million homes for sale or under contract at the end of August, down 1.5% from July and unchanged from August 2021, NAR said. At the current sales pace, there was a 3.2-month supply of homes on the market at the end of August.

Charlie and Ashley Richards, who are both 29, started shopping for the first home in Charleston, S.C., in June after they found out their rent was going up by $800 a month. 

“We got into the market at the right time. Stuff was starting to slow down a bit,” Mr. Richards said. “There were a handful of houses that we looked at that had been on the market for 30 to 60 to even 90 days.”

They bought a house this month for about 3% below the asking price. “I’m very excited,” Mr. Richards said.

The share of first-time buyers in the market was 29% in August, unchanged from a year earlier. About 24% of August existing-home sales were purchased in cash, up from 22% in the same month a year ago, NAR said.

Existing-home sales fell the most month-over-month in the Midwest, down 3.3%. Sales were unchanged in the South and rose slightly in the West and Northeast.

A measure of U.S. home-builder confidence fell for the ninth straight month in September to the lowest level since May 2020, the National Association of Home Builders said this week. About one-fourth of builders surveyed said they had reduced prices in the past month, NAHB said.

Housing starts, a measure of U.S. home-building, rose 12.2% in August from July, the Commerce Department said this week. Residential permits, which can be a bellwether for future home construction, fell 10%, however.

News Corp, owner of The Wall Street Journal, also operates Realtor.com under license from NAR.

Write to Nicole Friedman at nicole.friedman@wsj.com