When Doc discovered the note in his secret lab in 2035, he was confused since he wasn't in trouble. However, shortly afterward he lost his memory by an electric jolt shot by Officer Griff Tannen. Amnesiac and confused, Doc reached into his pocket, found Marty's note, and went to the location and time specified in the note.
Once he regained his memory, Doc gave Marty a bag of canisters, telling him to leave a note in a canister in his secret lab if he is ever in trouble.
Clara sent a message from 1893 saying you were in trouble.
I found your secret lab — if you get this, make contact with me! I can help!
March 3, 1986
(about 8:20 at night)
- Back to the Future (IDW Publishing)