LONG BEACH, Calif.—Hillary Clinton secured the delegates needed to clinch the Democratic nomination Monday night, according a tally by the Associated Press, crossing a historic milestone as she campaigned in California and pushed to end a long presidential primary campaign on a high note.

Mrs. Clinton, who was only 23 delegates shy of the 2,383 needed for victory after Sunday’s Puerto Rico primary, received commitments from additional delegates late Monday. Just a day before Tuesday’s contests in California and five other...