This is a 5-part dose-escalation study to determine the maximum tolerated dose (MTD)/maximum administered dose (MAD) of MK-4166 in participants with advanced solid tumors. In Part A, MK-4166 doses will be escalated quickly in successive cohorts and based on safety events may progress to Part B, in which the preliminary MTD will be identified. Based on safety events the study may progress to Part C in which the MTD will be confirmed. In Part D, participants will receive escalating doses of MK-4166 plus a fixed dose of pembrolizumab (MK-3475) 200 mg to determine the MTD for MK-4166 in combination with pembrolizumab. Based on safety events in Part D, the study may progress to Part E in which the MTD for MK-4166 in combination with pembrolizumab will be confirmed.